• (nodebb)

    If we wish to be pedantic about "for completeness", the options should also include Fail.

  • (nodebb)

    The Facebook problem is clearly wrong, Der Dritte Raum (The third room, translated from German) requires all menu items to appear three times, not just two.

  • AzureDiamond (unregistered)

    the date problem is simple they divide the difference by millis/year and (Date.parse("2025-01-26") - Date.parse("2018-01-28")) / 31536000000 returns 7

  • Rob (unregistered) in reply to AzureDiamond

    How hard is it to uze floating-point arithmetic for that?

  • (nodebb) in reply to Rob

    More to the point, how hard is it to use a better estimate of millis per year, so that the division calculates based on 365.25 (or a more refined version if you prefer)? It's still wrong, but it won't exhibit this particular misbehaviour.

    In the end, of course, what we want is yeardiff minus one, or yeardiff exactly if the date with an earlier year is earlier in that year than now is in the current year. In the case in the WTF, it would use just yeardiff-1, which is 6, which is less than 7.

  • (author) in reply to Steve_The_Cynic

    yes, the number of seconds per year is 31557600, not 31536000

  • (nodebb) in reply to Steve_The_Cynic

    Once upon a midnight dreary, fingers cramped and vision bleary, system manuals piled high and wasted paper on the floor...

  • The Incredible Holk (unregistered)

    Sure they remembered the ingredients: Ingredient 1, Ingredient 2 and Ingredient 3.

Leave a comment on “Retry Fail”

Log In or post as a guest

Replying to comment #:

« Return to Article