predicates/date_predicates library
Functions
-
isAfter(
String str, [String? reference]) → bool -
Returns
trueifstrrepresents a date afterreference. -
isBefore(
String str, [String? reference]) → bool -
Returns
trueifstrrepresents a date beforereference. -
isBetween(
String str, String from, String to) → bool -
Returns
trueifstrrepresents a date strictly betweenfromandto. -
isDate(
String str) → bool -
Returns
trueifstris a parseable date string. -
isFuture(
String str) → bool -
Returns
trueifstrrepresents a date in the future. -
isLeapYear(
String str) → bool -
Returns
trueifstrrepresents a date in a leap year. -
isPast(
String str) → bool -
Returns
trueifstrrepresents a date in the past. -
isToday(
String str) → bool -
Returns
trueifstrrepresents today's UTC date. -
isWeekday(
String str) → bool -
Returns
trueifstrrepresents a Monday–Friday. -
isWeekend(
String str) → bool -
Returns
trueifstrrepresents a Saturday or Sunday. -
tryParseDate(
String str) → DateTime? -
Parses
stras a UTC DateTime, returningnullon failure.