date_checker library
Convenient extension methods to check dates
Extensions
- DateChecker on DateTime
- Extension methods on DateTime
Properties
- sundayAsStartOfWeek ← bool
-
Sets the start of the week to Sunday if set to true. This affects the result.
of
isLastWeek
andisThisWeek
no getter
Functions
-
weekEnd(
{DateTime? date, bool isMondayStartOfWeek = true}) → DateTime -
Returns the last day of the week in which
date
is present. Ifdate
is not provided,the current dayDateTime.now()
is considered. -
weekStart(
{DateTime? date, bool isMondayStartOfWeek = true}) → DateTime -
Returns the first day of the week in which
date
is present. Ifdate
is not provided, the current dayDateTime.now()
is considered.