add new function roundToNearestMinutes#928
Conversation
46d79c9 to
dd4f96e
Compare
|
The PR was released as Thank you for your great work! |
|
this is very limited just 1 to 30 minutes. What about 33 minutes ? |
|
@dcrystalj please elaborate your use case for rounding to 33 minutes. Regarding the seconds, hours, whatever, the function is called |
|
@kossnocorp sorry my point was just that we need more generic function. I would expect of this fn to work if I give it roundToNearestMinutes(date, 120) same as roundToNearestHour(date, 2) RIght now in my project I need function to round to nearest hour, 3 hours, day and 3 day... Maybe we should just open issues to implement |
|
@dcrystalj yeah, that makes sense. Feel free to open those, but also send PRs. |
|
@kossnocorp if you file a separate issue I can try to work on it. Thanks for the feedback. |
Fixes #787