How to round off to the closest 5 minute interval if it is 1 or 2 minutes ahead or behind?

前端 未结 0 1813
日久生厌
日久生厌 2021-02-12 16:47

I want to round off an Instant / LocalDateTime to its closest 5 minutes interval in Java.

Examples: Suppose the time is: 2021-02-08T19:0

相关标签:
回答
  • 消灭零回复
提交回复
热议问题