[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Date Countdown Script?
Hello,
Sorry for the confusion.
Two versions:
1) End of millennium is 31 December 1999
The statement
Date.parse(new Date(99, 11, 31, 23, 59, 59)) - Date.parse(new Date())
gives the number of milliseconds from now until end of millennium
2) End of millennium is 31 December 2000
The statements
leap_year_in_milli = 31622400000; //2000 is a leap year
Date.parse(new Date(99, 11, 31, 23, 59, 59)) - Date.parse(new Date()) +
leap_year_in_milli
gives the number of milliseconds from now until end of millennium
Good luck
At 11:30 5/02/96 -5000, you wrote:
>Hello all,
>
> I'm relatively new to both Javascript and this this. I am putting
>together a page for our organization relating the year 2000
>millenium issues. I'd like to add a counter to display the number of
>years, months, days and weeks until January 1, 2000. Javascript seems
>like a good choice for this, avoiding cgi. Before I go ahead and
>"reinvent the wheel", is there a similar date manipulation script I
>might use as a starting place? Thanks in advance.
>
--
Lourdes Yero
E-mail: lyero@dino.conicit.ve
- Follow-Ups:
- unsubsribe
- From: "Richard J.Boulianne" <rickb@elecomm.net>