• (nodebb)

    I'm baffled how someone knows how to use AddDays with negative numbers but fails to use AddYears ...

  • Hanzito (unregistered)

    Idk. The line doesn't seem important: if it's one year before the release date, then ... I don't think it matters much if it's one year or one year minus a day.

    It is an odd line though. Why would you change behavior a year after release? Urge people to upgrade? If it's more serious than that, then the test itself is a bigger WTF.

  • (nodebb)

    Since DateTimeOffset came late to SQL Server I've seen a lot of issues when using DateTime instead of DateTimeOffset for date calculations in C#. In some instances combining bad data and bad code can produce the correct result. 😆

  • (nodebb)

    Why would you change behavior a year after release?

    We lack the context to answer that, because we don't know what the "release date" is referring to. Is it the software's own release? Or is it the date where some business object was "released"? (And, of course, without knowing what "releasing" the business object even means, it's extremely difficult to judge anything about if the code is correct.)

    And, in any event, I'd invert the adjustment and compare the release date plus a year to "now". But do it with .AddYears(1).

  • 516052 (unregistered)

    We need to abolish the leap year thing anyway. The only thing its good for is preventing a slow drift in month names vs seasons. And seasons are already out of whack thanks to climate change. The average person only lives for less than 100 years anyway so the drift won't even effect us that much.

  • Yazeran (unregistered) in reply to 516052

    <quote>We need to abolish the leap year thing anyway. The only thing its good for is preventing a slow drift in month names vs seasons. And seasons are already out of whack thanks to climate change. The average person only lives for less than 100 years anyway so the drift won't even effect us that much.</quote>

    Just like the Egyptians, they kept using the their calendar for 2000 years eventually going through a full cycle and coming back in sync with the seasons....

  • (author) in reply to Yazeran

    I say we combine the best of the Egyptian model and the Leap Year model: the year is 360 days long, and then you get 5 (or 6) days that aren't "part" of the year, and represent a festival. It's party time.

  • Jason Stringify (unregistered) in reply to 516052

    *affect

  • (nodebb) in reply to 516052

    The only thing its good for is preventing a slow drift in month names vs seasons.

    The only thing? Really? You've thought this through? Absolutely no other reason saunters through the crosswalk of your mind? Fantastic, I look forward to the complete lack of DateTime incompatibilities this will result in.

  • (nodebb) in reply to Remy Porter
    Comment held for moderation.
  • (nodebb)

    "Why would you change behavior a year after release? " Because it's a 1-year contract and something needs to happen to justify renewal.

  • Kevin Lyda (unregistered)
    Comment held for moderation.
  • Richard Brantley (unregistered) in reply to n9ds

    "Because it's a 1-year contract and something needs to happen to justify renewal."

    Sales: "Is there someone less experienced I can talk to?"

  • Meir (unregistered) in reply to 516052

    Gee, in the Northeast there have been two large snowstorms in January and February, which the last I checked are winter months. "Seasons are already out of whack" my foot.

  • (nodebb) in reply to Yazeran

    The only thing its good for is preventing a slow drift in month names vs seasons.

    Tell that to all those folks who argue about the date calculations for Easter...

  • (nodebb) in reply to Remy Porter

    I say we combine the best of the Egyptian model and the Leap Year model: the year is 360 days long, and then you get 5 (or 6) days that aren't "part" of the year, and represent a festival. It's party time.

    Yeah right. Not. That reminds me of some "argument" I heard when France mandated the 35-hour week: 5 hour party every week! Look that worked so well in the long run, everybody else copied the model! sarcasm

    Also you know what would happen if someone wanted to change the calendar system. There are 873,501,477 ways to choose 5 days from 365.

Leave a comment on “Years Go By”

Log In or post as a guest

Replying to comment #:

« Return to Article