in reply to Re^2: My favourite way to spend a leap day ...
in thread My favourite way to spend a leap day ...

I remember dealing with the Y2K bug back in 1985. I was working at a stock brokers and 15-year bonds were maturing the same day. Some examples (in the spoiler) in case the reasoning isn't immediately obvious:

Using YYMMDD formatting in the evening batch processing:

  • (bond purchased on 31-12-1984)
    Was 841231 (processing date) >= 991231 (maturity date)?
    No, bond hasn't matured so no payout.
  • (bond purchased on 31-12-1984)
    Was 991231 (processing date) >= 991231 (maturity date)?
    Yes, bond has matured so pay client.
  • (bond purchased the next day on 01-01-1985)
    Was 850101 (processing date) >= 000101 (maturity date)?
    Yes, bond has matured so pay client.
    Oops!

Anyway, I recall implementing the "4/100/400 leap year rule", along with changing YYMMDD to YYYYMMDD, as part of the fix.

— Ken

  • Comment on Re^3: My favourite way to spend a leap day ...