- 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 just made my own time parser, WHERE is my dollar?? :)
Admin
My guess is it's another convention like sData. It's a string, so s. Then again, maybe I'm giving him too much credit.
Admin
One of them was named Lor. There were a few others caused by time anomolies (sp?)
Admin
The ISO format should be enough for everyone!
yyyy-MM-dd HH:mm:ss
(Silently ducks and hides)
Admin
Experts treat warnings as errors, but ignore them if that is the right thing to do in the particular circumstance.
Admin
Reminds me of some date parsing code I came across in production. In the UK we put the day first, month second, but the US would often be a default setting and people would forget to set it.
The code in question dealt with working out whether a particular date in some data was day first, or month first.
i.e. is 5/10/08 the 5th October or 10th May?
The solution: if month > 12 then swap day and month.
It worked... over 50% of the time!
Admin
to quote the late great Mitch Hedberg:
"So you're a cook, can your farm?"
Admin
amen, but integrating legacy code breaks this mantra...especially with java generics
Admin
Almost every co-worker I've ever had...
Admin
Date parsing good in modern languages? Really?
In Java if you don't call setLenient(false); on your date format class, it accepts invalid formats, and fills in the blanks where information is missing. Fair enough, you say, always call setLenient(false); Except that even this doesn't work properly. I found situations where it once again guessed and filled in the blanks when passed garbage that approximates a date.
Does this mean I should write my own date parsing function? Well no. My solution though an awful kludge:
Having to do the above. THAT is a WTF!?
Admin
Probably the guy who coded this speaks Portuguese, "datas" is our word for "dates", and "dados" is our word for "data".
Admin
might as well put in the loop
for(Locale locale:Locale.getAvailableLocales() && !stop) {
try { stop=true; }
and weed out the use of break keyword!
Admin
the
HTML tags create pre-formatted text. Text within these tags is typically displayed in a non-proportional font exactly as it is laid out in the file. Whereas browsers ignore white space for all of the other HTML tags, theAdmin
I don't see the WTF here. How would you create the Date?
Admin
Hey, that was today's date!
Admin
The sad thing is that I'm working with a very expensive product sold by IBM that does almost this exact thing.