UnitComparision extension
Methods
-
isAtSameDayAs(DateTime other, {bool enforceUTC = false})
→ bool
-
Returns if two dates are in same day, month, year.
-
isAtSameHourAs(DateTime other, {bool enforceUTC = false})
→ bool
-
Returns if two dates are in same hour, day, month, year.
-
isAtSameMicrosecondAs(DateTime other, {bool enforceUTC = false})
→ bool
-
Returns if two dates are in same microsecond, millisecond, second, minute, hour, day, month, year.
-
isAtSameMillisecondAs(DateTime other, {bool enforceUTC = false})
→ bool
-
Returns if two dates are in same millisecond, second, minute, hour, day, month, year.
-
isAtSameMinuteAs(DateTime other, {bool enforceUTC = false})
→ bool
-
Returns if two dates are in same minute, hour, day, month, year.
-
isAtSameMonthAs(DateTime other, {bool enforceUTC = false})
→ bool
-
Returns if two dates are in same month, year.
-
isAtSameSecondAs(DateTime other, {bool enforceUTC = false})
→ bool
-
Returns if two dates are in same second, minute, hour, day, month, year.
-
isAtSameYearAs(DateTime other, {bool enforceUTC = false})
→ bool
-
Returns if two dates are in same year.
-
isSameLocalWeekAs(DateTime other, [int? weekStart])
→ bool
-
Returns whether
this
and other
is in same local week. Local week is determined by weekStart
, defaults to DateTime.monday