predicates/date_predicates library

Functions

isAfter(String str, [String? reference]) bool
Returns true if str represents a date after reference.
isBefore(String str, [String? reference]) bool
Returns true if str represents a date before reference.
isBetween(String str, String from, String to) bool
Returns true if str represents a date strictly between from and to.
isDate(String str) bool
Returns true if str is a parseable date string.
isFuture(String str) bool
Returns true if str represents a date in the future.
isLeapYear(String str) bool
Returns true if str represents a date in a leap year.
isPast(String str) bool
Returns true if str represents a date in the past.
isToday(String str) bool
Returns true if str represents today's UTC date.
isWeekday(String str) bool
Returns true if str represents a Monday–Friday.
isWeekend(String str) bool
Returns true if str represents a Saturday or Sunday.
tryParseDate(String str) DateTime?
Parses str as a UTC DateTime, returning null on failure.