3 ms·
> My personal favorite: how long is a month? One solution is to distinguish between a "datetime" and a "duration". You cannot convert a duration to days (or re
by dirkt 6y ago
> My personal favorite: how long is a month?
One solution is to distinguish between a "datetime" and a "duration". You cannot convert a duration to days (or really anything). You can add or subtract a duration from a datetime, and you can convert the difference between two concrete datetimes into days.
And that's actually how some libraries already implement it.
So the answer to "how long is a month" is "it depends, and I can only say if you apply this duration to a concrete time".