Y2K at DoD
May 14, 2007 by BrianBoyko | 9 commentsFrom Defenselink.mil
(Edit: Kiltak’s telling me the site looks fine from his end – I’m wondering if this is a Firefox thing.)
- Firefox 3: It’s here!
- Firefox 3.5 is Out!
- Problem with [GAS] – Can anyone help?
- Firefox Gran Paradiso Alpha 5 Released
Did you enjoy this post? If so, subscribe to the geeksaresexy RSS feed.
Subscribe by Email














yep, it only does it in firefox.. strange :)
We’re standardized on IE7 at work.
No date at all if you use a text-based browser, like Lynx:
http://img.photobucket.com/albums/v472/macoafi/lynxDoD.png
The __________ is the search bar in the upper right. It goes straight to “About Defenselink” right after and leaves off the date.
One of my friends tried Konqueror and Opera, and it does the 107 on there too. Kazehakase probably also does it as that’s a Gecko-based browser. Now just need someone to pop in on whether old versions of IE do it or not, and about Safari.
Yep…only in firefox…I tried it on IE6 and IE7, and 2007 is displayed using a PC with Windows Vista…Opera, Safari and Chimera 0.6 display 107 in my OS X mac book…weird…
That means they’re coding some kind of IE-specific Javascript. Javascript is why it is blank for Lynx but shows on the others. If IEs are all that have shown “2007″ out of Gecko (Firefox), Opera, KHTML (Konqueror, Safari), it has to be that they’re coding to a browser instead of coding to standards which is *bad*practice*
———————————-
var today_date= new Date()
var month=today_date.getMonth()
var today=today_date.getDate()
var year=today_date.getYear()
var months = new Array(”January”,”February”,”March”,”April”,”May”,”June”,”July”,
“August”,”September”,”October”,”November”,”December”);
SCRIPT language=Javascript document.write(months[month]+” “+today+”, “+year);
————————————
getYear() returns the current year – 1900, so the result you get is
exactly what the spec says you should get. If you want 2007 rather than
107 people have to use getFullYear():
I left them a comment about this issue. Now let’s see how fast they are to resolve it.
And IE probably treats getYear() and getFullYear() the same, confusing the devs who only tested in IE, right?
Yeah, they fixed it.
Wow, they’ve actually listened and implemented my suggested fix :) That was quick!
var year=today_date.getFullYear()