Hacker News new | ask | show | jobs
by lifthrasiir 1843 days ago
I should clarify that my dislike of YearMonth and ilks is for standard types without any localization [1] or non-Gregorian support. They do crop up from time to time but you have a very straightforward representation of YearMonth in any reasonable language: a pair of (year, month), essentially interpreted as a mixed-radix number. Date and general date-time components are not that simple (thanks to the calendar system itself, leap seconds and time zones) and deserves separate types.

[1] I firmly believe that the localization support is too large for standard libraries. In particular, that "localization support" usually means that you have a ripoff version of CLDR & ICU interface and no equivalent to something like gettext, essential to any actual localization task.