The YearDay library looks like this:

YearDay(string) // to date

I like 2019.233, I think it works well for this style of writing. I thought of building keywords into the library, like but I will hold off for now.

Dan thinks that if the world was asked to adopt a new date format then it would need a different year zero because starting the count from Jesus’ ostensible birthdate is an atavistic piece of Eurocentrism. He’s not wrong I guess. I included an alternative year zero as a non-default option.

I also found out about ISO-8601 Ordinal. There are three main differences between their specification and my YearDay spec.

  1. They use a dash (2019-233), I prefer a dot (2019.233)
  2. They pad out the day (2020-008), I prefer not (2020.8)
  3. Their time format is human readable (HH:MM:SS), mine's not

Ordinal dates are reasonably well supported though, and they're similar enough that we can just extend one slightly, call it YearDay and be done with it. All-in-all, date standards are a minefield that I won't wade into much further.