ExtDate extension

on

Properties

age int

Available on DateTime, provided by the ExtDate extension

Calculates age in full years from this birth date.
no setter
endOfDay DateTime

Available on DateTime, provided by the ExtDate extension

Returns the end of this day (23:59:59.999).
no setter
isFuture bool

Available on DateTime, provided by the ExtDate extension

Returns true if this date is in the future.
no setter
isPast bool

Available on DateTime, provided by the ExtDate extension

Returns true if this date is in the past.
no setter
isToday bool

Available on DateTime, provided by the ExtDate extension

Returns true if this date represents today.
no setter
isTomorrow bool

Available on DateTime, provided by the ExtDate extension

Returns true if this date represents tomorrow.
no setter
isWeekday bool

Available on DateTime, provided by the ExtDate extension

Returns true if this date is on a weekday (Monday to Friday).
no setter
isWeekend bool

Available on DateTime, provided by the ExtDate extension

Returns true if this date is on a weekend (Saturday or Sunday).
no setter
isYesterday bool

Available on DateTime, provided by the ExtDate extension

Returns true if this date represents yesterday.
no setter
startOfDay DateTime

Available on DateTime, provided by the ExtDate extension

Returns the start of this day (00:00:00.000).
no setter
week List<DateTime>

Available on DateTime, provided by the ExtDate extension

Returns the start and end dates of the current week.
no setter

Methods

addDays(int days) DateTime

Available on DateTime, provided by the ExtDate extension

Adds days days to this date.
ago({String locale = "en"}) String

Available on DateTime, provided by the ExtDate extension

Returns a human-readable relative time string.
format({String pattern = "dd MMM yyyy", String? locale}) String

Available on DateTime, provided by the ExtDate extension

Formats this date using the given pattern and locale.
formatMY([bool fullMonth = true]) String

Available on DateTime, provided by the ExtDate extension

Formats this date as "Month Year".
isSameDate(DateTime dateTime) bool

Available on DateTime, provided by the ExtDate extension

Checks whether this date has the same day and month as the given dateTime.
isSameDay(DateTime other) bool

Available on DateTime, provided by the ExtDate extension

Checks whether this date occurs on the same calendar day as other, including year.
subDays(int days) DateTime

Available on DateTime, provided by the ExtDate extension

Subtracts days days from this date.