Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

jquery Countdown

Posted on 2010-08-26
3
Medium Priority
?
579 Views
Last Modified: 2012-05-10
Hi there,

Could someone explain to me how the Date shown  below works?

(This is a parameter in  the Jquery CountDown Javascript package... the link to it is below.)

until: new Date(2012, 8 - 1, 8), timezone: +10

I mean: 2012 is the year, but what are the other numbers, and the dash?

Thanks!
fskilnik

Link: http://keith-wood.name/countdownRef.html#labels
0
Comment
Question by:fskilnik
3 Comments
 
LVL 83

Expert Comment

by:leakim971
ID: 33537947
when you create a date with JS you mays use : new Date(year, month, day)

the month is particular, month start from 0 to 11. So you need to remove (the dash) 1

read this : http://www.w3schools.com/jsref/jsref_getmonth.asp

and this (new Date(y,m,d) : http://www.w3schools.com/jsref/jsref_obj_date.asp
0
 
LVL 6

Accepted Solution

by:
DalHorinek earned 2000 total points
ID: 33537962
8-1 is a month

Months are 0 - 11, so it's august (8) but js need 7 (8-1)

and the other 8 is a day, so this date is 08-08-2012

0
 

Author Comment

by:fskilnik
ID: 33538164
Thank you both, but I guess DalHorinek solved exactly my doubts!

Regards,
fskilnik.

P.S.: I will open another EE post at the next minutes on the same matter, because I still could not use the until property with success. Please do have a look at my new (JQuery) doubt!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The most up-to-date version of this article is on my Blog https://iconoun.com/blog/
There are a couple ways to attach a JavaScript function to dynamically created elements. You can make a new script for each element as it’s created or you can use delegation. Delegation allows a single script that is added at page creation to mat…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question