#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Posts
    216
    Rep Power
    11

    Question Help w/ jQuery Countdown Date Syntax


    I'm using the jQuery Countdown plug-in to display a countdown on my site. Here is the plug-in:

    http://www.keith-wood.name/countdown.html

    I'm having trouble setting the "until"/countdown date. I need it to be exactly 24 hours after a specified date. This specified date includes year, month, day, hour, and second. Is this possible?

    Here's the reference page:

    http://www.keith-wood.name/countdownRef.html

    The parameter in question is the "until" parameter.

    Any help would be greatly appreciated. Thank you.
    Last edited by msmith29063; March 9th, 2013 at 09:49 AM.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Posts
    216
    Rep Power
    11
    After some testing, it looks like I can do this:

    Code:
    $(SELECTOR).countdown({
    	until: new Date(2013, 3-1, 9+1, 7, 24, 49),
    	format: 'HMS',
    	compact: true
    });
    I was concerned that I couldn't just add "+1" to the day field. But I tested with adding a day to 12/31 and it still worked. Is this correct?

    Thank you again.

IMN logo majestic logo threadwatch logo seochat tools logo