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

To have a better understanding of what operations you are trying to do. I can't answer your question specifically because it depends a lot on use case and what date/time standards you want to use.


To expand on this a little, there are operations that have slightly ambiguous meanings/can end up with different answers depending on your assumptions.

e.g. If today is the 30th of January 2024. What is the date in 1 months time?

Should it be the 29th of February? (as the 30th doesn't exist). The 28th? (the penultimate day of the month, like the 30th of Jan). The 1st of March (a 'standard' month should be considered 30 days, so 30 days from now).




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

Search: