you are viewing a single comment's thread
view the rest of the comments
[–] 2 points 1 year ago (8 children)

That sounds serious, can you give some example values we can test?

  • source
  • parent
  • hideshow 8 child comments
  • [–] 12 points 1 year ago (5 children)

    look I'm not trying to be a dick or anything, but do you not know about leap years and which years they are?

  • source
  • parent
  • hideshow 5 child comments
  • [–] 2 points 1 year ago (3 children)
  • [–] 5 points 1 year ago* (last edited 1 year ago) (2 children)

    Leap years are each fourth year, except each hundredth year, except each thousandth fourhundredth year.

    1896 leap year
    1900 not leap year
    1904 leap year
    ...
    1996 leap year
    2000 leap year
    2004 leap year
    ...
    2096 leap year
    2100 not leap year
    2104 leap year

    Then you just arrange the 10 year window in different positions to overlap 1 to 3 leap years to reveal the three outcomes of the bug.

    - / - - - / - - - /
    - - / - - - / - - -
    - - 0 - - - / - - -

    - is a normal year, / is a leap year, 0 is an exceptional non-leap year.

  • source
  • parent
  • hideshow 2 child comments
  • load more comments (1 reply)