I made a support request with a vendor asking if there’s a way to leverage the logic they already have for determining what counts as a business day (it is very critical that this is done exactly correctly and that it never breaks in the future if nobody is maintaining it) when using their API since I didn’t want to have to maintain a separate source of truth for it, and in their response they said:
it is not too hard to do date/timestamp arithmetic
which any developer who has done date/time arithmetic knows is the understatement of the century
Famously everyone thinks so until they take down an important system by forgetting about DST, or leap years, or that leap years don’t happen every 100 years, or that they do happen every 400 years, or not considering implications of people using different calendar systems, even if they’re just slightly different like having weeks start on a different day, or they consider whether the first week of the month is the first full week or the partial week before that, or they format it in a different order.
Then when they finally think, “OK, but I know about that,” then they learn about the leap second, or the negative leap second.
So yes, date math is “too hard”.













