DateExtension extension

on

Properties

isCurrentMonth bool
Chech if this month is the current month
no 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 today
no 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 than date (without reference to Time)
isDateBefore(DateTime date) bool
Check if this is before than date (without reference to Time)
isSameDay(DateTime date) bool
Chech if this is the same date then other (without reference to Time)
monthsDiffrenceTo(DateTime date) int
Calculates the difference in months between this date and other.