Mark's rant

TIL: Dates with year >9999

Today when going through a database, I came into a case where a date column had year >9999. The most standard way we generally represent date is YYYY-MM-DD, note there are 4 Y's. This is obviously a practical representation as, why why would you need to store a date thousands of year in the futures.

But alas apparently it's part of the ISO 8601 expanded representation. In this representation any year after year 9999 is represented with a + so the first date is +10000-01-01. There is also a year 0 which represents 1BC, and any year below that is represented with a - eg) -1000-01-01.

Learnt something new from corrupted data in database that's a win