Solved

jquery Countdown

Posted on 2010-08-26
3
569 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 82

Expert Comment

by:leakim971
Comment Utility
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 500 total points
Comment Utility
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
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

by Julian Matz As of jQuery (http://jquery.com/) 1.4 the .live() method (http://api.jquery.com/live/) supports custom events as well as some standard JavaScript events that it previously didn't support. Among these is the submit event. Unlike …
What is a Lightbox? A Lightbox is the effect you see when you click, for example, an image and the screen fades out and up pops the same image but in its full size dimensions. There are lots of Lightbox effects for jQuery. Problem is they are a…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)

763 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now