Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Or just use ISO8601 standard notation (e.g. "P1D" for one day)


or PT1400M or P0.5DT700M?

oh, you can use commas too.

and if you're still not thinking this is fun, here's a quote from Wikipedia "But keep in mind that "PT36H" is not the same as "P1DT12H" when switching from or to Daylight saving time."

just add a unit to your period parameters. sigh.


Maybe surprising for days (could also happen with minutes because of leap seconds technically :-) but for months and years this is more apparent due to month ends and leap years.


TIL ISO8601 also standardizes duration




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: