LikeDateTimeExtension extension

DateTime extension utilities available on non-nullable DateTime.

on

Properties

endOfDay → DateTime

Available on DateTime, provided by the LikeDateTimeExtension extension

Returns end of the day (23:59:59.999).
no setter
endOfMonth → DateTime

Available on DateTime, provided by the LikeDateTimeExtension extension

Returns end of the month (last day 23:59:59.999).
no setter
endOfWeek → DateTime

Available on DateTime, provided by the LikeDateTimeExtension extension

Returns end of the week (Sunday 23:59:59.999).
no setter
endOfYear → DateTime

Available on DateTime, provided by the LikeDateTimeExtension extension

Returns end of the year (Dec 31 23:59:59.999).
no setter
isToday → bool

Available on DateTime, provided by the LikeDateTimeExtension extension

Whether the date is today.
no setter
nextDay → DateTime

Available on DateTime, provided by the LikeDateTimeExtension extension

Returns the next day (+1 day).
no setter
nextMonth → DateTime

Available on DateTime, provided by the LikeDateTimeExtension extension

Returns the same day in the next month.
no setter
nextWeek → DateTime

Available on DateTime, provided by the LikeDateTimeExtension extension

Returns the next week (+7 days).
no setter
nextYear → DateTime

Available on DateTime, provided by the LikeDateTimeExtension extension

Returns the same day in the next year.
no setter
previousDay → DateTime

Available on DateTime, provided by the LikeDateTimeExtension extension

Returns the previous day (-1 day).
no setter
previousMonth → DateTime

Available on DateTime, provided by the LikeDateTimeExtension extension

Returns the same day in the previous month.
no setter
previousWeek → DateTime

Available on DateTime, provided by the LikeDateTimeExtension extension

Returns the previous week (-7 days).
no setter
previousYear → DateTime

Available on DateTime, provided by the LikeDateTimeExtension extension

Returns the same day in the previous year.
no setter
startOfDay → DateTime

Available on DateTime, provided by the LikeDateTimeExtension extension

Returns start of the day (00:00:00.000).
no setter
startOfMonth → DateTime

Available on DateTime, provided by the LikeDateTimeExtension extension

Returns start of the month (1st day 00:00:00).
no setter
startOfWeek → DateTime

Available on DateTime, provided by the LikeDateTimeExtension extension

Returns start of the week (Monday 00:00:00).
no setter
startOfYear → DateTime

Available on DateTime, provided by the LikeDateTimeExtension extension

Returns start of the year (Jan 1 00:00:00).
no setter
timeAgo → String

Available on DateTime, provided by the LikeDateTimeExtension extension

Returns human-readable relative time string (e.g. "just now", "5m ago", "2h ago", "3d ago").
no setter
toDateString → String

Available on DateTime, provided by the LikeDateTimeExtension extension

Returns ISO-8601 formatted date string (YYYY-MM-DD).
no setter

Methods

differenceFrom(DateTime other) → Duration

Available on DateTime, provided by the LikeDateTimeExtension extension

Returns the difference duration between this date and other.
isSameDay(DateTime other) → bool

Available on DateTime, provided by the LikeDateTimeExtension extension

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

Available on DateTime, provided by the LikeDateTimeExtension extension

Checks if this date is in the same month as other.
isSameYear(DateTime other) → bool

Available on DateTime, provided by the LikeDateTimeExtension extension

Checks if this date is in the same year as other.