TimeOfDayExtensions extension
Convenience methods on TimeOfDay.
- on
Methods
-
ceil(
) → TimeOfDay -
Available on TimeOfDay, provided by the TimeOfDayExtensions extension
Creates a new TimeOfDay fromthis
by updating minute to 59. -
ceilToInterval(
int minuteInterval) → TimeOfDay -
Available on TimeOfDay, provided by the TimeOfDayExtensions extension
Creates copy ofthis
with the minute value rounded to the least minute value that is divisible byminuteInterval
but is not smaller than current minute value. -
clamp(
TimeOfDay? minimum, TimeOfDay? maximum) → TimeOfDay -
Available on TimeOfDay, provided by the TimeOfDayExtensions extension
Clampsthis
object to be within the specified time rangeminimum
-maximum
. Ifthis
is already within the range, it is returned unchanged. Ifthis
is not within the range, the function returns the closest valid TimeOfDay within the range. The function also supports time ranges that span across midnight. -
floor(
) → TimeOfDay -
Available on TimeOfDay, provided by the TimeOfDayExtensions extension
Creates a new TimeOfDay fromthis
by updating minute to 0. -
floorToInterval(
int minuteInterval) → TimeOfDay -
Available on TimeOfDay, provided by the TimeOfDayExtensions extension
Creates copy ofthis
with the minute value rounded to the greatest minute value that is divisible byminuteInterval
but no greater than the current minute value. -
isAfter(
TimeOfDay other) → bool -
Available on TimeOfDay, provided by the TimeOfDayExtensions extension
Returns true ifthis
occurs afterother
. -
isBefore(
TimeOfDay other) → bool -
Available on TimeOfDay, provided by the TimeOfDayExtensions extension
Returns true ifthis
occurs beforeother
. -
isInRange(
TimeOfDay start, TimeOfDay end) → bool -
Available on TimeOfDay, provided by the TimeOfDayExtensions extension
Returns true ifthis
occurs in rangestart
-end
. -
roundToInterval(
int minuteInterval) → TimeOfDay -
Available on TimeOfDay, provided by the TimeOfDayExtensions extension
Creates copy ofthis
with the minute value rounded to the closest minute value that is divisible byminuteInterval
. -
toMinutes(
) → int -
Available on TimeOfDay, provided by the TimeOfDayExtensions extension
Convertsthis
to minutes.