-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
Description
Sorry if this has already been answered, but I searched the issues and docs and didn't see anything like this.
Is there a way to round to the nearest X of an interval with date-fns? For example, is there anything like this?
roundToNearestMinute(new Date())
roundToNearestMinutes(new Date(), 5)
roundToNearest(new Date(), 5, "minutes")
startOfMinutes(new Date(), 5)
startOf(new Date(), 5, "minutes")
endOfMinutes(new Date(), 5)
endOf(new Date(), 5, "minutes")vgebrev, dcrystalj, alextes, bennycode and qwloh