- 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
Not entirely true... actually the earth just takes slightly less than 365 1/4 days to rotate the sun. We still add a day every 4 years anyway, to keep close to on track. All we need is a "leap century" in which we add an remove a leap day at random in a century every thousand centuries or so, and we're golden.
~md5sum~
Admin
Thanks, you inspired me to try to use Tickler liberally throughout my code whenever I can.
Admin
Ladies and gentlemen I give you TRWTF
CAPTCHA: saluto (your solutio?)
Admin
The Daily WTF has now become The Almost Daily and Usually Around 1400 GMT, but Sometimes Just Old Rehash WTFs WTF. WTF?
P.S. Alex, thanks for the free entertainment... Keep it up! Without you I wouldn't have hours of ridiculous comments to read. The articles are usually pretty good too.
~md5sum~
Admin
Admin
Sure, the week goes back to Adam. The only older timekeeping period is probably the day.
Interesting question about North America. This web site -- http://americanindian.net/moons.html -- gives American Indian names for days of the week, but there's no indication of the history of these names, whether these were names they attached to a concept brought to them by Europeans or if these names have been around for millenia. I understand the Mayas and the Aztecs had 13 and 20 days overlapping periods that were their equivalent of a week.
Admin
If the purpose of this function is to figure out the day of the week after doing date arithmetic, it's pretty pathetically limited. It can handle a subtraction of at most 6 says and and addition of at most 12, and those only if you start at the right point. It can't reliably handle adding more than 6 or subtracting anything.
I suppose if we saw it in the context of the larger program, perhaps there is some place where they are doing date arithmetic and they know that they will never add more than 6 days, someone might have decided that handling this special case like this was easier than writing a more general function that would have handled any number of days. If that's the case, I suppose I wouldn't be too critical.
I've written functions that handle only a subset of a general problem because I know that in the context I'm dealing with, the other cases will never come up. But this sort of thing always makes me nervous, because I worry that someone will come along later, not realize the limitations of my solution, and try to use it in cases where it doesn't work. How reasonable this is depends on the context. "No one will ever enter a date more than 10,000 years into the future into this program" would be quite reasonable for most applications -- the odds my program will still be in use by then are small. But "No one will ever enter a date more than 20 years in the future" is a very dangerous assumption. Lots of people were thinking that around 1980, which resulted in some excitement around 2000, remember?
Admin
Did you really just write this excuse?
Friday plus seven days is still Friday...
Admin
Admin
Admin
Stop typing with your mouth full
Admin
Admin
According to the simple majority of my 50+ y/o native australian acquaintances, Sunday is the first day of the week in AUS. However (1) I expect large regional variations and age-related variations (2) Children of athiest labour/socialist/communist voting English migrants strongly prefer Monday, and (3) Aus is largely 1st, 2nd or 3rd generation migrant anyway.
What irritates me is that the MS Windows calendar has no documented way to change the week start day. You can either choose region as US (Sunday start), or AU (Monday start), but no way to choose AU and just over-ride start day.
Note that the calender week start day is purely a personal preference. nobody would care if everyone set their calendar week start day to random days. All Finance programming allows configuration of explicit week start day independent of system convention, to handle both international companies and bizarre accounting conventions.
Admin
IF I'm understanding what you're saying, in Outlook 2007 here's how to set the week start day:
Tools>Options> click on Preferences Tab, then click on Calendar Options.
Outlook 2002 was similar.
I'm in the US; my work, appointment, and social week begins with Monday.
Admin
Presumably this was a dirty fix for some wrap-around bug due to date arithmetic, and the programmer didn't know about integer modulus.
Reminds me of the application I saw that was for business whose official day ran from 4am to 4am the next day (it was a public transport corporation). The ticketing system didn't allow for this and the business rules engine (e.g. for a daily ticket) assumed everything ran from midnight to midnight. So these geniuses decided that, rather than fix the business rules, the entire server farm would run with OS-level timezone settings four hours to the west (!)
Unsurprisingly they ended up doing a whole lot of patch-up time calculations in the presentation layer, and reporting never did get fixed to avoid the erroneous overlaps...
Admin
My guess is that the developers probably needed one solution for an intercultural international Julian-and-Gregorian-Calendar-compatible-day-of-the-week picker for all their antique cataloging dB needs. Surely that must be it. What else?
Admin
They forgot the second Saturday!!!!!!!!!!! What kind of horrid people are these???!!!!!!!??!!!?/!!