- 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
To be fair, using a short to represent the year component in a date object makes sense. It's not like you'll ever need more than 8 bits of year. So this is less of a WTF and more of a Oh, neat.
Edit Admin
I think you meant 16 bits. 8 bits would allow only 256 possible values which while probably good enough for the lifetime of many systems, definitely feels needlessly risky.
Edit Admin
As a non-American, the real WTF is the MM/DD/YYYY date format.
Edit Admin
What a "weak" solution!
Admin
Is that the same "Progress" 4GL I used in 1991 I wonder?
Admin
I may be missing something, but in the roll-over case the results would be "backwards", wouldn't they? The week number should always be on the left side of the subtraction, not on the right. The way it is, week 0 will result in week 26 (which is roughly ok), while week 26 yields week 0 of the previous year, which would be one and a half years ago?
Edit Admin
Not sure if it's a mistake in Mirjam's memory, Remy's editing, or a real error in the original, but isn't
26 - v-weeknumberjust plain wrong? If the start date is February 1, then week number is 5, and the result would be week number 21 (roughly mid-May). Unless52 - 26 - v-weeknumberis right-associative, which would give the correct result but would be a definite language WTF.Addendum 2026-06-17 06:57: :hanzo:
Admin
Indeed. My bad. I'd blame my years but that would just be a cliche.
Admin
Or rather, an actual WTF is non-Americans who cannot grasp the basic concept of their being more than one way to do things. Both formats have a place and logic behind them. This attitude of only yours being valid is frankly childish.
Admin
My thought exactly.
Edit Admin
And a reminder that there are different standards for week numbering
https://en.wikipedia.org/wiki/Week#Other_week_numbering_systems
noting that it seems USA uses two different ones.
Edit Admin
OT: I bookmark comment pages I want to check on later, but TDWTFs comment page titles are all the same, so I have a single 'The Daily WTF: Curious Perver ...' bookmark. (And three with keyboard mash at the end.)
Edit Admin
Agreed. Should probably be
52 - 26 + v-weeknumberAdmin
The earliest possible date should be 01/01/-32768. It's either a copy-paste error or the person writing the docs is thinking the "most negative" value has to have the largest numbers possible. But even in negative years, January is still earlier than December.
Admin
I kinda don't hate the 52 - 26. Yes, it's mathematically unnecessary. But at a glance, I know exactly what's happening where I might have to think a sec if I saw 26 instead.
Admin
As a non-American, yes, there are multiple ways to do dates. There's the international standard yyyy-mm-dd (which is ideal for a number of reasons) There's the older dd/mm/yyyy (you're scanning left to right and want to see date first - not as good, but okay) There's d/m/yy (or some mix of which fields are abbreviated) which isn't as good, and can sometimes cause problems, but if you want quick'n'dirty it's there...
Then there's mm/dd/yyyy which never makes sense unless you grew up with both it and American exceptionalism. Try telling time as min:sec:hour and see how confusing that gets if you want middle-endian data. Note, if you instead do mon dd yyyy (e.g. July 4 2026) and you speak that way (i.e. you say "July 4" or "July 4th") then I'll accept that, in name form. But not numeric.
Edit Admin
There may be multiple week-numbering standards, but subtracting 26 (with wraparound) should be an OK way to go back half a year in all of them.
Admin
Most of the people complaining about mm/dd/yyyy prefer to use dd/mm/yyyy which is funny because if you're on this site, you should know that yyyy/mm/dd is vastly superior because it can be sorted as a string and for the most part nobody gets confused about which component is the month and which is the day (some people will be confused no matter what).
Admin
I exclusively use yyyy/dd/mm, just to be contrarian
Admin
As someone who's company's primary product is based on Progress ABL... I'm sorry to hear there is someone else that works in it. I should check my codebase to see if this is us or not, but I'm pretty sure it's not.
Admin
Seeing that code gave me flashbacks of having to debug some code that a supplier provided that didn't work - and they couldn't figure out why!
They wrote it but couldn't fix it to make it do what they designed it to do. So I - who'd never used the language before - had to help out to fix it.
Admin
I prefer yyyy-mm-dd (or variations of delims with that order) myself, especially for filename and similar sorting purposes.
FWIW, I have seen people outside of the States using mm/dd/yyyy, citing that it's useful to see the month first as the dom is less useful without knowing that and the year at the end when the year isn't important to the context. I also believe that comparing it to 'min:sec:hour' vs 'hour:min:sec' is a bit of a apples vs oranges fallacy. I do appreciate having a natural progression, especially as a numbers and tech guy, but it's still two separate categories of horology, and like with anything else, you can't just say "if it works best in category A, it must also be the best for B and that's that."
Admin
Yes, @Tim. Progress ABL used to be called 4GL. It now supports classes, integrates with .NET and various other "modern" niceties.
Admin
I exclusively use Julian dates. Months are a Pagan superstition that has no place in the modern world.