Git Product home page Git Product logo

vincentloy / simplycountdown.js Goto Github PK

View Code? Open in Web Editor NEW
128.0 5.0 52.0 920 KB

Tiny javascript CountDown library.

Home Page: http://vincentloy.github.io/simplyCountdown.js

License: MIT License

CSS 8.55% JavaScript 37.91% HTML 35.80% SCSS 17.74%
countdown-timer countdown countdown-clock javascript-library javascript-countdown no-jquery jquery-countdown jquery countup countup-timer

simplycountdown.js's People

Contributors

dependabot[bot] avatar mehdiraized avatar vincentloy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

simplycountdown.js's Issues

How to set the target date?

What am I doing wrong? I change the date here, but the counter shows 67 seven days instead of 190. (Today is the 7th of January, 2022)

simplyCountdown = function (elt, args) {
var parameters = extend({
year: 2022,
month: 7,
day: 16,
hours: 16,
minutes: 0,
seconds: 0,
words: {
days: 'day',
hours: 'hour',
minutes: 'minute',
seconds: 'second',
pluralLetter: 's'
},
plural: false,
inline: false,
enableUtc: false,

Thank you!

Issue with UTC?

Hi what does the enable UTC parameter do?

I have a problem with a counter, if I set the time in UTC and sets the UTC flag to true. The remaining time still varies if I change timezone on my computer.
Has I misunderstood the flag?

Regards,
Jens

"countUp" enhancement suggestion

A little enhancement suggestion - some users might need the script to count up from a past date. Add a parameter "countUp" (default: false) and in "refresh" function, after the seconds are calculated:

if (parameters.countUp && secondsLeft <= 0 )
secondsLeft *= -1;

and it'll work like a charm!

Change language

Hi!

Is it possible to change the words displayed on the countdown so one could change the language? Thank you!

doesn't even work

if( $('.countdownTimer').length ) {
$('.countdownTimer').simplyCountdown({
year : 2018,
month : 9,
day : 21
});

}

Remove unnessary units

Is there any way to remove days when no days are needed?
Expected behavior:
2 days, 1 hour, 10 minutes, 0 second => 2 days,1 hour,10 minutes, 0 seconds
0 day, 1 hour, 10 minutes, 0 second => 1 hour,10 minutes, 0 seconds
0 day, 0 hour, 10 minutes, 0 second => 10 minutes, 0 seconds
0 day, 0 hour, 0 minute, 03 seconds => 03 seconds

image

Remove ID Only compat

actually, to call simplyCountdown. You must call it using HTML ID's like so :

simplyCountdown('eltID'; options);

It would be great to add ability to use both ID's or Classes.
Not simply using a javascript querySelector that will match only the first item.

UTC Support

My countdowns are ending too early in other time zones. It would be nice to be able to set a UTC time to make sure everyone seeing it is seeing the same thing.

Date Format Question

Excellent work, thank you for sharing!

Is there any way to format the date within simplyCountdown so that standard date pickers can be used? Example: I have input form and users pick a date using https://cdnjs.com/libraries/bootstrap-datetimepicker

Since most date / time pickers can use formats like "2018-12-31 23:55:21", is there way to use this format with simplyCountdown?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.