- 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
hehe
Admin
Working with day%10 would have been easier.
Admin
Found this in the javascript supplied by www.azcentral.com today:
var d = new Date(); var month = d.getMonth(); var day = d.getDate(); var year = d.getFullYear();
if(day == 1) { var date_suffix = 'st '; } else if (day == 2) { var date_suffix = 'nd '; } else if (day == 3) { var date_suffix = 'rd '; } else { var date_suffix = 'th '; }
switch(month) { case 0: month = 'Jan '; break; case 1: month = 'Feb '; break; case 2: month = 'Mar '; break; case 3: month = 'Apr '; break; case 4: month = 'May '; break; case 5: month = 'Jun '; break; case 6: month = 'Jul '; break; case 7: month = 'Aug '; break; case 8: month = 'Sep '; break; case 9: month = 'Oct '; break; case 10: month = 'Nov '; break; case 11: month = 'Dec '; break; }
Admin
TRWTF is failing to call OS library functions, unless this code was written in 1987.
Admin