amatriz / jquery-countdown

Automatically exported from code.google.com/p/jquery-countdown
0 stars 0 forks source link

Countdown to date Implementation #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Not a bug, but a new implementation.

With this implementation, the difference between a future date (set by the 
administrator easily) is dynamically calculated and set as the input for the 
jquery countdown.

In this fashion, one can set a countdown to a given date instead of for a 
static amount of time.

See it here:
http://thecountdown.saucier.biz

Can email me at spsaucier@gmail.com.

Original issue reported on code.google.com by spsauc...@gmail.com on 13 Oct 2010 at 12:17

GoogleCodeExporter commented 9 years ago
How to add date? 

Original comment by Chudik...@gmail.com on 13 Oct 2010 at 11:48

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
In line 19:
var arrival=new Date(today.getFullYear(), 10, 25) 

10 means November (months 0-11)
25 means the 26th (days 0-29 for Nov)
________________________________________________________

Also, may want to add something like this between lines 20-21 so that a date 
that has already passed won't be invalid (haven't tested this for sure):

if (today.getMonth()==11 && today.getDate()>25) //if the date has passed already
arrival.setFullYear(arrival.getFullYear()+1) //calculate next year's date 
instead

Original comment by spsauc...@gmail.com on 13 Oct 2010 at 1:15

GoogleCodeExporter commented 9 years ago
@spsaucier --

Your code causes the counter to go from 00 to 95, instead of 59 like it should.

Original comment by wastingt...@gmail.com on 19 Nov 2010 at 8:57

GoogleCodeExporter commented 9 years ago
I think this is an important feature - in fact, it's probably the most 
important.
Specifying a time interval is not useful to my use case at all - I have a date, 
and I need to countdown to it - wouldn't this be the 90% use case?

Original comment by spurrymo...@gmail.com on 11 Dec 2010 at 5:45

GoogleCodeExporter commented 9 years ago
@spsaucier --

Your code causes the counter to go from 00 to 95, instead of 59 like it should.

Original comment by jbuenafl...@gmail.com on 20 May 2011 at 11:29

GoogleCodeExporter commented 9 years ago
is there a fix for the countdown's seconds part hitting 95 seconds?

Original comment by abbas11...@gmail.com on 15 Aug 2011 at 12:23

GoogleCodeExporter commented 9 years ago
I've put a few fixed together here:

https://github.com/pfarmer/jquery-countdown

and will continue to improve the code and add features, patches and pull 
requests are welcome!

Original comment by pfar...@gmail.com on 22 Sep 2011 at 10:12

GoogleCodeExporter commented 9 years ago
Have now added a feature to allow a Date object to be used for startTime.

https://github.com/pfarmer/jquery-countdown

Original comment by pfar...@gmail.com on 22 Sep 2011 at 12:20

GoogleCodeExporter commented 9 years ago
I do not get a proper display when using "startTime: new Date('June 01, 2013 
14:00:00')". Is there no possibility to get more than 99 days???

Original comment by MojitoJoe on 25 Jun 2012 at 12:57

GoogleCodeExporter commented 9 years ago
I figured out that this was caused by the div appended in line 181 
("where.append('<div>');"). Commenting that line did it. Don't know what these 
divs are used for (are empty).

Original comment by MojitoJoe on 25 Jun 2012 at 1:08