vincentloy / simplycountdown.js Goto Github PK
View Code? Open in Web Editor NEWTiny javascript CountDown library.
Home Page: http://vincentloy.github.io/simplyCountdown.js
License: MIT License
Tiny javascript CountDown library.
Home Page: http://vincentloy.github.io/simplyCountdown.js
License: MIT License
When the value hits 0
, the plural word should be used instead of the singular word.
Currently it shows 0 day
instead of 0 days
. See also https://ell.stackexchange.com/a/51183.
can i know how to change tim elike its 335 days and i want it like 7 days 59hr 59 sec
please can i get to know ?
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!
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.
Hi. I'm having trouble importing/using this. I am using Laravel / Laravel Mix / Webpack. I've npm installed the javascript but don't know how to actually install it into my site code?
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
For example the dutch language:
Singular:
Plurals:
This is not fixed by a simple by a single 's'
Hi!
Is it possible to change the words displayed on the countdown so one could change the language? Thank you!
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!
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
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!
Or add the option to remove 0 days, 0 hours, 0 minutes automatically.
so:
0 days 0 hours 22 minutes 30 seconds
would be:
22 minutes 30 seconds
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.
if( $('.countdownTimer').length ) {
$('.countdownTimer').simplyCountdown({
year : 2018,
month : 9,
day : 21
});
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.