News for hackers. Stuff that matters.
Re:Ask HN: Did you encounter any leap year bugs today? by bhaney on Thursday February 29, 2024 @07:57PM (#39557252)
> There's a clean way to subtract 365 days

What is it? Does it attempt to return a datetime that's the same time as the input but 365 calendar days earlier (ignoring leap seconds? compensating for time zone changes?), or does it subtract 31536000 seconds from the current datetime? Because those aren't necessarily the same and it's ambiguous which one you mean by "subtract 365 days"

There are no comments on this comment yet.