- 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
Ensimmäinen!
Admin
Feb. 31, Eleventy-Eleven is okay?
Admin
"Unfortunately that number was one"
You were fortunate that the number was greater than zero.
Admin
How did anyone sign up when yearOK never gets set to true?
Admin
Some people just don't think through this stuff. How many people of the marketing department actually registered on the site?
Admin
Admin
Admin
I'm pretty sure they wouldn't realize how f*cking annoying their brilliant questionnaire is to anyone who doesn't give a damn about it.
Quite interesting that anyone would be considered qualified for sales duty and still not understand the customer's perspective -- yet another proof they didn't need good coders anyway ;)
Admin
@justsomedudette: it gets initialized to true.
Which is rather amusing, though I believe they could have verified the years, too. Using a code generator.
Captcha: praesent - i made u print "if (" + " || ".join([str(o) for o in range(2011)]) + ")" as a praesent.
Admin
Anyone else catch that the day and month if() statements checked twice to see if the value was 10?
Admin
print "if (year == " + " || year == ".join([str(o) for o in range(2011)]) + ")"
captcha: plaga - i have the brain plaga today
Admin
So what happens when I try to sign up with my birthdate of:
1/1/'; drop database; --
Admin
correct me if I am wrong but would 7/14/aa be a valid date?
Admin
Miks kaikki on aina ihan "FRIST1!1!!"
Admin
yearOK is always true : [code] var dayOk; var monthOk; var yearOk;
dateOk = false; monthOk = false; yearOk = true;[/code}
Admin
Dearest Mr. Mark Steyn,
Thanks you so very much for posting this validation code. I am in need of such for the finnishing touches on my time, date and calendar application. However I have doubts because when I am making reuse of this code I geterrors. Could you PLEASE repost this code so it works for Java EE 6? I am under such urgent deadline.
Admin
Fixed?
Admin
Captcha: incassum. The total number if incas.
Admin
Helping you, mine asteemd coleague!
sed 's/function/public String/' sed 's/var/String/'
Much happiness reguards to be completing deadline!
Admin
But each month has different numbers of days:
Admin
sed 's/true/"true"' sed 's/false/"false"'
Admin
Admin
"Curiously fewer people signed up for the site that the marketing department anticipated..."
Than. THAN!
Admin
Verify ALL the DOBs!
Admin
My favorite part is where they put "10" in each list twice.
Admin
What I like about you is that you're so much smarter than ALL the people around you.
Admin
Admin
c'mon you can do better than that...
Admin
Just why are you here, anyway?
Admin
Yeah, I could have done that but nobody complained and it wasn't on the bug report.
Admin
Well, it's a well-known fact that it's difficult for JavaScript™ programmers to get dates.
Admin
Yeah, what they SHOULD be doing is triggering a daily printout containing a list of all users who attempted to log in; every night they should then send out a representative to each of these users' locations to examine the users' drivers' licenses to make sure the DOB is actually correct! You can't just have people making up dates without verifying them, you know!
Admin
What about 28th day? Yeah, still I like how I can choose year like Year of Fruitbat
Admin
Why not just store all valid dates in a database on a special date-checking server, and query it from their javascript function? So much better, and easier to update if our calendar system changes suddenly.
Admin
It's part of their internationalization campaign. They are already ready for Chinese years.
Admin
Hmm... A challenge. Implement DD/MM/YYYY sanity checks with as few WTFs and as much esoteric features as possible...
Admin
Nope, there is no 14th month. Atleast it uses almost sensible format dd/mm/str
Admin
Finally, a site where I can correctly enter my birthday of 31/02/apple
Admin
Thirty questions, hmmm? It was probably the ones about the location of the hideout key and the in-house safe that scared everyone off.
Admin
None of them, of course. ("I'm not answering all those snoopy questions.")
I realize that sounds pretty brain-dead, but then most of marketing seems to be brain-dead. Witness The Great Google Banner Ad Conspiracy.
Admin
wouldn't this throw a javascript error for defining "var dateOkay" twice? or is that a typo when you declare it globally before actually declaring it?
Admin
Admin
wisi: or do wi?
Admin
Admin
Nah, you don’t need no code generator to verify the year. We successfully used the following in production for almost 10 years:
Admin
No miksei olisi?
Admin
I think the coder should get points for thinking about the leap year case. Obviously, on non-leap years, you can't have a birthday on the 28th because that would be the 29th on a leap year. right?
Admin
We call him Little Bobby Tables
Admin
Then we call you Little Bobby Tables.
Admin
Code generator, code schmenegator. Javascript has an eval() function, you know!
Captcha: saepius -- the original coder obviously wasn't very saepient