- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
i hope he drapes a hair over his keyboard when he leaves his desk
Admin
strange, I tried my birthday (29 jun 1984), the date in the screenshot and even 31 dec 2007, but none of them generated the error from this article...
Admin
It's an Omen. The true consequences of '1984' haven't arrived yet as described, hence the future reference, hence not a WTF. :P
Captcha: tesla - futuristic for his time. :)
Admin
Are we finally victimized by the Y2K bug?
Admin
Anyone else think maybe he had his system clock set incorrectly? I don't get it.
Admin
Sheesh, Kind of reminds me of a site that wouldn't let me log in, as "That user name was already in use".
Admin
My guess is it's the old non Y2k compliant JavaScript thing. The Date.GetYear() function returns varied results for different browsers (translation: microsoft didn't follow the standard).
Admin
Why are they biased against time travelers?
Admin
It happens in Safari with any date, but you have to change Safari's user agent to Mozilla or IE to view the page at all. Funny that the error never appears in 'supported' browsers.
Admin
TENTH!!!!! What a day!!!
Admin
Given that you actually tried a date in the future, it would suggest perhaps they've turned this error checking off already...
Admin
This is soooooo old.
The issue is with the JavaScript function Date.getYear(), which, by specification, should return the full year. However, MSIE only returns the number of years since 1900. Some stupid "webdesigner" wrote this site without a clue and undiscriminatingly assumed MSIE's wrong behaviour.
Now, guess where "if Date.getYear() > 108" (2008-1900) leads if a serious webbrowser (like Safari) returns 2007 on getYear().
sobani simply is an idiot who abuses MSIE as a webbrowser, that's why he can't trigger the bug.
Admin
The thought police will spot that and carefully replace it exactly as it was:
Not that that did Winston any good either of course...
Admin
Admin
IE returns 2007 for Date.getYear(). It's deprecated with Date.getFullYear() if you want to be picky.
I suspect this error is an issue with an OLD browser that needs to be updated, as opposed to the "seriousness" of the browser in question. What kind of jackass talks about how serious a web browser is anyways?
Admin
According to the standard, Date.GetYear is supposed to return 2 digits for anything between 1900 and 1999, 4 digits for anything else.
Now, since their script is presumably taking a 4-digit input (1984) from the user, this error would occur if Safari incorrectly returns 107 instead of 2007.
Either way, they should be using GetFullYear, but few people do.
Admin
Now this is making my brain hurt....
Their usage of SetFullYear should be correct. But doesn't (selectedDate <= now) mean that they're explicitly looking for dates from the future? Or do I just need more caffeine? Cause it works in firefox...
Admin
Dude! I'm from jun 29th TOO! I'll add you to my calendar
CAPTCHA: SMILE! It's our birthday... I've felt so alone all this time
Admin
Why are you so mean to call my poor fox such horrible names? Have you no heart?
captcha: doom, may it happen to you. :P
Admin
The "standard" that existed at the time (i.e. Netscape documentation) was silent on this issue.
EDIT: I just looked it up. In fact, http://wp.netscape.com/eng/mozilla/3.0/handbook/javascript/ref_f-g.htm#804 is not silent on this matter, rather it specifies precisely the behavior adhered to by IE (tested on 4 and 7), which modern mozilla implementations depart from by returning 107. And the screenshot, incidentally, is of safari.
Addendum (2007-05-21 15:54): Modern documentation indicates the specified behavior changed with javascript 1.3, and IE simply apparently did not change with it.
Addendum (2007-05-21 16:04): But the great thing about javascript is that if your script relies on getYear(), you can fix it yourself.
if(Date.prototype.getFullYear) Date.prototype.getYear = function() { return this.getFullYear() - 1900}
or, if your script for some reason relies on the old behavior:
if(Date.prototype.getFullYear) Date.prototype.getYear = function() { if(this.getFullYear() >= 1900 && this.getFullYear < 2000) return this.getFullYear() else return this.getFullYear() - 1900}
Admin
Yep. sharp: username taken sharpy: username taken sharpfn: username taken sharpf: username taken shrpf: username taken shrpfn: username taken shrpfng: username taken ugecwdef: username taken wfcvtfvcfc: username taken wugvbkwhgbc: username taken jhyuhwvbkhwgevbwbvyivcyivcvywif: username taken sharp1: please enter your password.
Yahoo had this for quite a while: all usernames had to contain at least one digit, otherwise you'd end up with "this username is already in use".
Admin
If I enter my birthday (28 jun 1984) ;-) I get the error with the system date set to 1984. ^^
Admin
agreed, the user has messed with their system clock
Admin
lol
Glad to see this made it on this site.
I was a software engineer on peepel.com. That error was from implementation AFTER I left the company, I'd like to point out.
Peepel.com is actually worthy of a WTF article... we had a project manager that was undermined by the director (who was not really good at what he tried to do), myself as the seniormost non-manager, and a couple other engineers that were ok. The project manager was really good, and together we (him more than me...) designed and created most of the people software, with the other 2 developers implementing as per his specification. They did a pretty good job of that too, to their credit.
The sofware is massive, and the only original developer left is one of the other 2 guys. I sent a letter to the director explaining the shortfalls of the business, and outlined many wrong decisions in terms of marketing and graphical design (cmon, who doesn't think the software graphics look shit). His pride and greed (we had share deals) got in the way and I got fired.
The project manager quit because of that One of the other 2 developers left to another job offer (more in his field of expertise) The 4th guy is still there.
I don't know who/if anyone else has been hired, but I know for sure there level of knowledge of javascript, and the framework we wrote, will never equal that of the project manager and myself, so the software is effectively stagnant.
This date error is the SMALLEST WTF related to peepel.com that I have seen so far.
Luke Schafer
Addendum (2007-05-23 02:17): Sorry about the almost ad-hoc nature of this post - I churned it out very quickly (i'm pretty busy) and didn't re-read any of what I wrote
Admin
So the real WTF is that Howi didn't left any documentation for his framework?
Captcha: doom, this is coming really often lately...
Admin
Woa, who catches an error condition in the catch section? That is a plain stupid use of try-catch :(
Admin
minime:
well actually, yes.
The whole sdlc was extreme programming, and we were pretty much forced to churn out functionality with no time allowed for documentation - another WTF
so no, i didn't really document my relevant sections (there were comments, but a lot of what I did was rather complex and fairly innovative in regard to how it uses javascript). The framework was not my responsibility, I was more of a consultant on it. Documentation was up to the project manager, but since 'management' (and I use the term loosely) didn't want to hire more people (which we needed), he needed to implement instead of document.
Admin
Wow... That guy was born on the same day as me!