Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • 13
    What do you mean by "end of the day"? The start of the following day minus 1 second? 1 millisecond? 1 nanosecond? Why not just use the beginning of the next day, and use [day, day + 1[ intervals? When a shop is open from 8AM to 6PM, the end time displayed is 6PM, not 5:59:59 PM.
    – JB Nizet
    Commented Apr 4, 2016 at 17:01
  • This answer also contains a solution for a ZonedDateTime stackoverflow.com/a/50400321/1658268
    – SudoPlz
    Commented May 17, 2018 at 20:53