On Jul 1, 1:09 am, Dr J R Stockton <j...@merlyn.demon.co.ukwrote:
In comp.lang.javascript message <f63fn801...@drn.newsguy.com>, Fri, 29
Jun 2007 10:32:24, Lee <REM0VElbspamt...@cox.netposted:
Dirntknow said:
>I've found this link to a countdown timer i'd like to use but although I can
get it to view correctly in my website i'm not sure what to edit for a
different date. What do i change for it to count down to 10:00am 15th August
for example?
How can we tell you that without knowing exactly what code you're using?
Easily. One changes the date and time in the code to represent the date
XXXX-08-15T10:00:00.000 in a suitable year.
And watch it go belly-up in all browsers other than Opera. :-(
While that format might be ISO correct, the best format (i.e.
acceptable in a wide variety of browsers) for a date string I have
found is:
new Date( 'yyyy/mm/dd hh:mm:ss' );
Attempting strict ISO compliance, time zones, or fractions of seconds
is doomed I'm afraid in most browsers.
Incidentally, if I create a date object in the future, say:
var t = new Date( '2010/01/01 01:00:00' );
alert( t.getTimezoneOffset() )
will I see the offset for that date (which may or may not include an
adjustment for daylight saving), or for when the code is run?
It seems to me it *should* return the offset for that particular date,
including daylight saving if known to be in force at that time. The
ECMAScript Language specification doesn't really help here.
--
Rob