DateExtension extension
- on
Properties
- isCurrentMonth → bool
-
Chech if
this
month is the current monthno setter - isFutureDay → bool
-
Chech if
this
is a day in the future (after today)no setter - isPastDay → bool
-
Chech if
this
is a day in the past (before today)no setter - isToday → bool
-
Check if
this
is same day as todayno setter - isTomorrow → bool
-
Chech if
this
is tomorrow (one day in the future)no setter - isWeekend → bool
-
Check if
this
is a day in the weekend (saturday or sunday)no setter - isYesterday → bool
-
Chech if
this
is yesterday (one day in the past)no setter
Methods
-
getDateOnly(
{bool withDay = true}) → DateTime -
Returns a DateTime with the same date as
this
but no reference to time -
isDateAfter(
DateTime date) → bool -
Check if
this
is after thandate
(without reference to Time) -
isDateBefore(
DateTime date) → bool -
Check if
this
is before thandate
(without reference to Time) -
isSameDay(
DateTime date) → bool -
Chech if
this
is the same date thenother
(without reference to Time) -
monthsDiffrenceTo(
DateTime date) → int -
Calculates the difference in months between
this
date andother
.