• nmclean (unregistered) in reply to anonymous
    anonymous:
    ...unless it's February?
    See bold:
    nmclean:
    I don't know what you're talking about, but I don't see why it needs to be this complicated. There is only a problem when the unit of time you want to work with is ambiguous. If we know that we want to work in months or years, we shouldn't be putting 30 or 365 days into the system in the first place; we should be adjusting the month or year component directly (and temporarily rolling back the day-of-month as needed when it is out of bounds). How are there 9 different answers to this?

    This is how any human given the same instructions would handle this problem, and how various APIs do it. It's not that complicated or open to interpretation.

  • Norman Diamond (unregistered) in reply to nmclean
    nmclean:
    Neil:
    Do we know that AddYears(21) won't stumble over a DST transition and therefore result in a date that's an hour off?
    No. Basically, it just adjusts the Year component of the date and makes no other assumptions: 1980/X/X + 21y = 2001/X/X. If X/X is Feb 29, and the resulting year is not a leap year, it just adjusts it to Feb 28 (this means that AddYears(3).AddYears(1) doesn't necessarily give the same result as AddYears(4)).
    TRWTF is Earth.
  • nmclean (unregistered) in reply to Norman Diamond
    Norman Diamond:
    nmclean:
    Neil:
    Do we know that AddYears(21) won't stumble over a DST transition and therefore result in a date that's an hour off?
    No. Basically, it just adjusts the Year component of the date and makes no other assumptions: 1980/X/X + 21y = 2001/X/X. If X/X is Feb 29, and the resulting year is not a leap year, it just adjusts it to Feb 28 (this means that AddYears(3).AddYears(1) doesn't necessarily give the same result as AddYears(4)).
    TRWTF is Earth.
    Earth's own cycle is far more consistent, and none of these issues would exist if all time was measured in nothing but pure integer divisions of it.
  • Norman Diamond (unregistered) in reply to nmclean
    nmclean:
    Norman Diamond:
    nmclean:
    Neil:
    Do we know that AddYears(21) won't stumble over a DST transition and therefore result in a date that's an hour off?
    No. Basically, it just adjusts the Year component of the date and makes no other assumptions: 1980/X/X + 21y = 2001/X/X. If X/X is Feb 29, and the resulting year is not a leap year, it just adjusts it to Feb 28 (this means that AddYears(3).AddYears(1) doesn't necessarily give the same result as AddYears(4)).
    TRWTF is Earth.
    Earth's own cycle is far more consistent, and none of these issues would exist if all time was measured in nothing but pure integer divisions of it.
    A day isn't an integer division of a year. TRWTF is Earth.

    The moon's rotation is the same as its revolution with respect to Earth, but not with respect to the sun. So TRWTF is still Earth.

  • t (unregistered) in reply to frost

    if you read the whole thing, there wasn't an issue with the feb 29 logs.

  • anon (unregistered)

    The only thing wrong with this code is everything.

  • JamesPaync (unregistered)

    Do you work in SEO, SMM, online marketing or work with cryptocurrency?

    XEvil is the best tool for decisions kapch with unlimited number answers kapch, without restrictions on quantity of streams and the highest accuracy! XEvil 5.0 supports more than 12,000 types of images-kapchi, turning on Google captcha, Yandex captcha, Microsoft captcha, Steam captcha, SolveMedia, reCAPTCHA-2 and (YES!!!) Rekapcha-3 too .

    1.) Flexibly: you have an opportunity to adjust logic for non-standard kapchy 2.) Easily: just start XEvil, press button 1 - and it mechanically will accept kapch from your application or a script 3.) Soon : 0.01 seconds for simple kapchy, about 20. 40 seconds for rekapchi-2 and about 5... 8 seconds for rekapchi-3

    You can apply XEvil with any software of SEO/SMM, any analyzer of verification of passwords, any analytical application or any user script: XEvil maintains the majority well-known services of an antikapcha of API: 2Captcha.com, RuCaptcha, AntiGate.com (Anti-Captcha), DeathByCaptcha, etc.

    Domestic clients save and receive MUCH money!

    It is interesting ? Easily find in Google or YouTube of "XEvil" for more information You look through it - means, it works !

    Unique opportunity: completely involuntary a round kapch The program is capable on an extent registration and posting to distinguish and bypass more than 500 types of popular graphic protection, including such difficult as ReCaptcha, VBulletin-kapcha, DLE капча, a kapcha of VKontakte and Facebook and so forth.

    At acquisition of the program XEvil complex use any discount coupon and receive a discount in 45%!!!

    ATTENTION: COUPONS FOR JULY http://www.botmasterru.com/ JULY2021-45-210731-g07xjigbgo2s0cgt JULY2021-45-210731-g07xjigbjg0vco7j JULY2021-45-210731-g07xjigbjg2ihcur JULY2021-45-210731-g07xjigbjghm998x JULY2021-45-210731-g07xjigbjgjaxf6e JULY2021-45-210731-g07xjigbm829pmjl JULY2021-45-210731-g07xjigbm8qzqt0b JULY2021-45-2

  • TheresaTut (unregistered)

    Joking aside!

    attention mistress latoya

  • MarilynRexum (unregistered)

    Should you tell it — a false way.

    circumspection sexual tickle torture

  • Anthonyxjj (unregistered)
    Comment held for moderation.
  • Eddiegah (unregistered)
    Comment held for moderation.

Leave a comment on “Failure to Leap”

Log In or post as a guest

Replying to comment #:

« Return to Article