jiffy
jiffy copied to clipboard
Nearest quarter or half our from and before date and time ?
I was wondering if this exists and I just can't find it because the library is so large.
I was just asked to set a DateTIme to be "the next half hour from now"
i.e. if it's 10:20 the next half hour would be 10:30 and if I add thirty minutes to now its's 10:50 and the next half hour is 11:00
This worked well but thought it was useful and might be a nice add to the library if it doesn't exist ...
https://stackoverflow.com/questions/60880315/how-to-round-up-the-date-time-nearest-to-30-min-interval-in-dart-flutter