Results 1 to 7 of 7
Thread: Date Display in IE vs FireFox
Oct 9, 2007, 12:47 #1
- Join Date
- Jul 2003
- Great Northwet
- 0 Post(s)
- 0 Thread(s)
Solved: Date Display in IE vs FireFox
The survey sez:
It's a known, um, anomaly, in FireFox.
Use function getFullYear() instead of getYear()
That's all, folks!
I have a simple piece of code that works as expected in IE6 and IE7. It displays strangely in FireFox 2x and Konqueror3.5
document.write("© OHSD 2002-" + cDate.getYear());
In IE it displays correctly:
© OHSD 2002-2007
In FireFox and Konqueror, it displays in a bizarre fashion:
© OHSD 2002-107
Considering that FF and Konqueror tend to be more standards-compliant than IE, I suspect it's bad code. In any case, what would be better code, or a fix, or a work-around?
Last edited by snorky; Oct 9, 2007 at 13:22. Reason: Problem SolvedSnorky
Bless the little children while they're still too young to hate.
- Tom T. Hall