DateExtension extension

on

Properties

firstDayOfMonth → DateTime

Available on DateTime, provided by the DateExtension extension

Returns the first day of the month for the current DateTime instance.
no setter
isFirstDayOfMonth → bool

Available on DateTime, provided by the DateExtension extension

Checks if the date is the first day of the month.
no setter
isLastDayOfMonth → bool

Available on DateTime, provided by the DateExtension extension

Checks if the date is the last day of the month.
no setter
isToday → bool

Available on DateTime, provided by the DateExtension extension

Checks if the date is today.
no setter
isTodayOrAfter → bool

Available on DateTime, provided by the DateExtension extension

Checks if the date is today or after.
no setter
isTodayOrBefore → bool

Available on DateTime, provided by the DateExtension extension

Checks if the date is today or before.
no setter
isTomorrow → bool

Available on DateTime, provided by the DateExtension extension

Checks if the date is tomorrow.
no setter
isYesterday → bool

Available on DateTime, provided by the DateExtension extension

Checks if the date is yesterday.
no setter
lastDayOfMonth → DateTime

Available on DateTime, provided by the DateExtension extension

Returns the last day of the month for the current DateTime instance.
no setter
nextDay → DateTime

Available on DateTime, provided by the DateExtension extension

Returns a new DateTime instance with a day added to the current instance.
no setter
nextHour → DateTime

Available on DateTime, provided by the DateExtension extension

Returns a new DateTime instance with an hour added to the current instance.
no setter
nextMonth → DateTime

Available on DateTime, provided by the DateExtension extension

Returns the next month for the current DateTime instance.
no setter
nextWeek → DateTime

Available on DateTime, provided by the DateExtension extension

Returns a new DateTime instance with a week added to the current instance.
no setter
nextYear → DateTime

Available on DateTime, provided by the DateExtension extension

Returns a new DateTime instance with a year added to the current instance.
no setter
previousDay → DateTime

Available on DateTime, provided by the DateExtension extension

Returns a new DateTime instance with a day subtracted from the current instance.
no setter
previousHour → DateTime

Available on DateTime, provided by the DateExtension extension

Returns a new DateTime instance with an hour subtracted from the current instance.
no setter
previousMonth → DateTime

Available on DateTime, provided by the DateExtension extension

Returns the previous month for the current DateTime instance.
no setter
previousWeek → DateTime

Available on DateTime, provided by the DateExtension extension

Returns a new DateTime instance with a week subtracted from the current instance.
no setter
previousYear → DateTime

Available on DateTime, provided by the DateExtension extension

Returns a new DateTime instance with a year subtracted from the current instance.
no setter

Methods

addDays(int amount) → DateTime

Available on DateTime, provided by the DateExtension extension

Adds a specified number of days to the current DateTime instance.
addHours(int amount) → DateTime

Available on DateTime, provided by the DateExtension extension

Adds a specified number of hours to the current DateTime instance.
addMonths(int amount) → DateTime

Available on DateTime, provided by the DateExtension extension

Adds a specified number of months to the current DateTime instance.
addYears(int amount) → DateTime

Available on DateTime, provided by the DateExtension extension

Adds a specified number of years to the current DateTime instance.
isSameDay(DateTime b) → bool

Available on DateTime, provided by the DateExtension extension

Checks if two DateTime instances represent the same calendar day.
isSameDayOrAfter(DateTime other) → bool

Available on DateTime, provided by the DateExtension extension

Checks if other is the same day as this or in the future.
isSameDayOrBefore(DateTime other) → bool

Available on DateTime, provided by the DateExtension extension

Checks if other is the same day as this or in the past.
isSameMonth(DateTime other) → bool

Available on DateTime, provided by the DateExtension extension

Checks if two DateTime instances are in the same month and year.
isSameWeek(DateTime b, {bool startsWithMonday = true}) → bool

Available on DateTime, provided by the DateExtension extension

Checks if two DateTime instances are in the same week.