DateTimeHelpers extension

on

Properties

isFutureDay bool
Whether the date is a day in the future.
no setter
isToday bool
Whether the date is today.
no setter
isTomorrow bool
Whether the date is tomorrow.
no setter
isYesterday bool
Whether the date is yesterday.
no setter
timeIsZero bool
Whether the time of the date is zero/empty.
no setter

Methods

copyWith({int? year, int? month, int? day, int? hour, int? minute, int? second, int? millisecond, int? microsecond}) DateTime
Returns a copy with the overridden (given) attributes.
copyWithEmptyTime() DateTime
Returns a copy with time set to zero/empty.
format(String pattern) String
Returns a String which represents the date formatted by the given pattern. Patterns can be found here (intl documentation).
isSameDay(DateTime other) bool
Whether the date is on the same day (regardless of the time) as the given date.