Comparisons extension

on

Properties

ago Duration

Available on DateTime, provided by the Comparisons extension

no setter

Methods

beginOfMonth({int monthAgo = 0}) DateTime

Available on DateTime, provided by the Comparisons extension

beginOfWeek() DateTime

Available on DateTime, provided by the Comparisons extension

beginOfYear() DateTime

Available on DateTime, provided by the Comparisons extension

earlierDate(DateTime other) DateTime

Available on DateTime, provided by the Comparisons extension

endOfMonth({int monthAgo = 0}) DateTime

Available on DateTime, provided by the Comparisons extension

endOfYear() DateTime

Available on DateTime, provided by the Comparisons extension

firstIsClosest(DateTime t1, DateTime t2) bool

Available on DateTime, provided by the Comparisons extension

getClosest(DateTime t1, DateTime t2) DateTime

Available on DateTime, provided by the Comparisons extension

isBetween(DateTime begin, DateTime end, {bool strict = false}) bool

Available on DateTime, provided by the Comparisons extension

check if a DateTime is between two other DateTimes. If strict is false isBetween is also true if this is equal to one of the interval borders.
isIn(Timespan t, {bool strict = false}) bool

Available on DateTime, provided by the Comparisons extension

same as isBetween but with a timespan as argument
isOlder(Duration duration) bool

Available on DateTime, provided by the Comparisons extension

laterDate(DateTime other) DateTime

Available on DateTime, provided by the Comparisons extension

midnight({int daysAgo = 0}) DateTime

Available on DateTime, provided by the Comparisons extension

get the current day with all small time units equal to zero
mostRecentWeekday(int weekday) DateTime

Available on DateTime, provided by the Comparisons extension

toShortWeekday() String

Available on DateTime, provided by the Comparisons extension