roundDown method
Implementation
DateTime roundDown(
{Duration durationToRoundDown = const Duration(minutes: 5),
bool isUTC = true}) {
DateTime roundedDown = DateTime.fromMillisecondsSinceEpoch(
millisecondsSinceEpoch -
millisecondsSinceEpoch % durationToRoundDown.inMilliseconds,
isUtc: isUTC);
// debugPrint("roundDown | $roundedDown");
return roundedDown;
}