• Dr Pizza (unregistered)

    ... all the rest, I can't remember.

    It's just struck me how bad that font is. 1, l, and i look almost indistinguishable from each other.

  • Hassan Voyeau (unregistered)

    I could understand if this was used for the month of february, but December?

  • David Stone (unregistered)

    I have often wondered why Courier New is the default font for VS.NET...it's just plain crappy.

  • R. Boeke (unregistered)

    Could you perhaps use absolute links for your images? I'm aggregating through rss bandit and need to visit the page to see the images each time.. ;|

  • Alex Papadimoulis (unregistered)

    Honestly, I swear, I try. The Lousy Bastard builtin text editor changes it to relative. Fixing the post now ....

  • Patrick Sullivan (unregistered)

    I'm using newsgator and the images show up fine...and actually inside the outlook '03 plugin they don't get blocked at all, somewhat interesting, I suppose that's a hole in the newsgator code.

  • Jim Bolla (unregistered)

    perhaps the coder was in the middle of refactoring this code so that it could be used for any month instead of just december :) Personally I think having the 12's hardcoded in there is a bigger sin than programmatically figuring out that there are 31 days in the 12th month. and the ugly string concatenation that could've been avoided by using a DateTime value and ToString("MM/dd/yyyy")

  • Frans Bouma (unregistered)

    "I don't know about you, but that grade school rhyme helps me remember which months have how many days. On the occasion that I don't remember that, I'll consult my wall or desk calendar."
    I always learned to remember it via the knuckles on your hand: Start at the right or left, doesn't matter. A knuckle is a month with 31 days, in between knuckles is a month not with 31 days :)

  • Nathaniel (unregistered)

    ...when short February's done. :)

  • Matt (unregistered)

    Could this be a i18n thing? Other calendars with 12 months might have a different number of days. Or not.

  • fogelman (unregistered)

    CurrentYear.AddYears(1).AddDays(-1) would have done fine on I18N and other funky calendars anyway I think

  • hao2lian (unregistered)

    Why conform? Every month has 2^(month_number) days in my book. Currently, June will be over for me in 39 days.

  • Centaur (unregistered)

    What bugs me most here is that "12/" & lastDay & currentYear.Year. This representation for dates has a great potential for i18n bugs. I’d be seriously tempted to test this code in a default non-US English locale (say, Russian with dates as d.MM.yy), my customized settings (Russian but with dates in yyyy-MM-dd), and my “extreme date-formatting testing” settings (dates in yyyy$MM$dd).

    And, this developer is being inconsistent; if 12th month can contain !=31 days, a year can contain !=12 months.

  • (cs)

    Thirty days hath September (except in 1752) the last day of which was the 30th, but according to cal (on most UN*X systems) September 1752 has 19 days 1,2,14,15,16, ...

    Interesting how dates are handled by most systems - especially the GetFileTime() and GetSystemTime() under windows dev

    I mean the description of FILETIME is WTF to me (64 bit value representing number of 100-nanosecond intervals since Jan 1 1601). Does anyone know of a file created pre 1920?



  • (cs)

    Presumably this breaks if the locale is set up to expect dates in DD/MM/YYYY format? Or perhaps it does some heuristics to notice that 12/31 cannot be the 12th of 31ember.

  • anonymous (unregistered)

    I know this is an old story, but the author might have had localization in mind. Not all calendars have 31 days in the 12th month (and some have more than 12 months). We assume Gregorian in the US, but Windows developers may need to support other calendar formats (yes, people really have other calendars besides Gregorian!). Of course, a programmer with localization in mind should probably NOT have hard-coded the date separator and format into the control...

  • (cs)


    Never heared of using you knuckles to figure out the length of the months?

    Index finger knuckle - January

    Pit - February

    Middle finger knuckle - March


    Little finger knuckle - July

    (go back or use other Hand)

    Next knuckle - August... You get the Idea.

  • Christian Rosjat (unregistered)

    That might actually be clever, because the so called fiscal year in Germany has 360(12x30) days.

  • cindy (unregistered)
    Comment held for moderation.
  • Isikyus (unregistered)

    ...except for February alone, and that has twenty-eight days clear, or twenty-nine in each leap year.

    Captcha: bene (good_)

Leave a comment on “Thirty Days Hath September ...”

Log In or post as a guest

Replying to comment #:

« Return to Article