• (cs) in reply to vindico
    vindico:
    Bob:
    gus:
    The real WTF is that while the number of days per year is constantly increasing (by about 68 seconds per century), necessitating adding extra days to the YEAR, the number of days per week is unlikely to undergo any changes anytime soon.

    So by "soon" you mean within 127,000 years?

    Whoosh!

    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~

  • Mike (unregistered) in reply to Harrow

    Thanks, you inspired me to try to use Tickler liberally throughout my code whenever I can.

  • SR (unregistered) in reply to Mike
    Mike:
    Thanks, you inspired me to try to use Tickler liberally throughout my code whenever I can.

    Ladies and gentlemen I give you TRWTF

    CAPTCHA: saluto (your solutio?)

  • (cs)

    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~

  • Anonymous (unregistered) in reply to md5sum
    md5sum:
    The Daily WTF has now become The Almost Daily and Usually Around 1400 GMT, but Sometimes Just Old Rehash WTFs WTF. WTF?
    Give the guy a break, he's been at a conference all week.
  • Jay (unregistered) in reply to Leo
    Leo:
    Case 14 DayOfTheWeek = STR_SNORFDAY

    Actually the 7 day week has probably been around longer than just about any other timekeeping convention, and likely without any interruption. You could go back week by week a few millennia and it'd still work. (Subject to geographical differences -- I don't think the ancient North Americans had a 7 day week, for example.)

    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.

  • Jay (unregistered)

    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?

  • Buffled (unregistered) in reply to Nathon
    Nathon:
    This is not that bad. Someone wanted to be able to add a number (less than 7) to the current day of the week and still know what day of the week it would be. Sure, there are other ways to do that, but really it's just a quick hack. I'm surprised this qualifies.
    Berry:
    It looks like it might be useful if you have, say, today's day-in-week number N and you want to show "a week from now" with DayOfTheWeek(N+7), but surely a modulo will be more flexible -- then you can do a fortnight hence as well!

    Did you really just write this excuse?

    Friday plus seven days is still Friday...

  • Buffled (unregistered) in reply to My Name?
    My Name?:
    dkf:
    ... Or a cow-orker knows how to apply a keyboard remap while a user is on a biobreak…)

    What is a cow-orker?

    It's ok, most of them work at M$ on Windoze.
  • Buffled (unregistered) in reply to Buffled
    Buffled:
    Nathon:
    This is not that bad. Someone wanted to be able to add a number (less than 7) to the current day of the week and still know what day of the week it would be. Sure, there are other ways to do that, but really it's just a quick hack. I'm surprised this qualifies.
    Berry:
    It looks like it might be useful if you have, say, today's day-in-week number N and you want to show "a week from now" with DayOfTheWeek(N+7), but surely a modulo will be more flexible -- then you can do a fortnight hence as well!

    Did you really just write this excuse?

    Friday plus seven days is still Friday...

    Sigh. The real WTF is me.
  • Dan (unregistered) in reply to Rumen
    Rumen:
    So, ppoplp, instpad of bpllyaching, lpt's hplp Alpx out and submit somp WTF's for him to usp. If wp arp rpading thpm, wp can submit thpm.

    (Sorry, pvpry timp I kpy thp lpttpr 'p' I gpt an 'e'.)

    Stop typing with your mouth full

  • ycgngvb (unregistered) in reply to tengrshyFghqrag
    tengrshyFghqrag:
    ycgngvb:
    (Fbeel, zl xrlobneq frrzf gb cebqhpr ebg13.)
    Gunaxf, V tbg gb hfr gur qhzo yvggyr ebg13 rapbqre V jebgr lrfgreqnl (V'z yrneavat P).
    Qbrf vg pnyy ivz gb qb vg?
  • Finance programmer (unregistered)

    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.

  • lesle (unregistered) in reply to Finance programmer

    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.

  • kosh (unregistered)

    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...

  • Kanariezwart (unregistered)

    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?

  • (cs)

    They forgot the second Saturday!!!!!!!!!!! What kind of horrid people are these???!!!!!!!??!!!?/!!

Leave a comment on “The Long Week”

Log In or post as a guest

Replying to comment #:

« Return to Article