Date Problems in Firefox 2.0.0.3

  • Thread starter Dr J R Stockton
  • Start date
D

Dr J R Stockton

After loading Firefox 2.0.0.3 recently, I've discovered the following
date-related problems for those who have been used to coding with MSIE.



Unlike in MSIE, Date.UTC(Y, M, D) seems to treat all D<1 as D=1 -
although it accepts D being too big for the month as that number of days
later, and months outside 0..11 as an appropriate number of months away.

But new Date(Y, M, D) has the same behaviour in both IE and FF. AFAICS
from the Standards, new Date and Date.UTC should both handle their
parameters in the same way. Therefore I rate it as a BUG.

That affects in particular function YMD2YWD(y, m, d) which I have
widely used for ISO Week Number.



D = new Date("") ; D.toString() gives "Invalid Date" rather than "NaN".
D = new Date('1111/11/11 AD') ; D.toString() gives "Invalid Date" rather
than the correct date, and likewise 'AD 1111/11/11' and '1111/11/11 G'
etc. and 2E99. Those are probably allowed.

Also new Date("2222/11/11 +03:00") is OK in FF but not IE; +0300 is OK
in both; allowing colon in FF is good except for FF developers who
assume IE can accept a colon.



Those are, and any others I may find or hear of will be, noted in a box
near the top of <URL:http://www.merlyn.demon.co.uk/js-datex.htm>,
unless/until I think of a better place to put it.


If anyone here knows how to tell the authors, please do so.


= = = =

ISTR, possibly, talk of a future FAQ entry on using a brief timeout to
allow the screen to update. These might be mentioned :-

A question from ZA has led to the questioner discovering that a timeout
before a printing call may be needed so that the print will be up to
date.

Without specific testing yet, it looks as if Firefox may not need pre-
display timeout - so those using FF to write for others ...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,270
Latest member
TopCryptoTwitterChannels_

Latest Threads

Top