1. 5
    1. 3

      There are twelve opportunities to insert leap seconds per year, between the last and first days of the month, so you’d have to check how far each month was from atomic time rather than each year.

      This is why we programmers aren’t allowed to do date arithmetic :)

    2. 1

      I’d think that using the raw GPS time would be more convenient than TAI for an internal monotonically increasing timescale, if for nothing else that I don’t know of any convenient TAI data feeds. I’m happy to be corrected though.