3 ms·
Dates are actually always durations. But most time libraries design fail to aknowledge that. When you say something is 4 months away, it means you're probably h
by slim 7y ago
Dates are actually always durations. But most time libraries design fail to aknowledge that. When you say something is 4 months away, it means you're probably happy with a 1 month resolution. 4 months from 31 July is November. 4 months from any day in July is always November.
- jimktrains2 7y agoBut 4 months from July 31 is Dec 1.
- slim 7y agothat's 123 days from July 31 not 4 months from July 31
- granshaw 7y agoTalk to any non programmer or mathematician on the street (aka your users) and they’ll expect the answer to be Nov 30.
- anchpop 7y agoReminds me of the old joke, why do programmers confuse Halloween and Christmas? Because DEC 25 is OCT 31