DateExtension extension

on

Properties

dateOnly DateTime
Returns a DateTime with the date of the original, but time set to midnight.
no setter
daysInMonth List<DateTime>
The list of days in a given month
no setter
firstDayOfMonth DateTime
no setter
firstDayOfWeek DateTime
no setter
isFirstDayOfMonth bool
no setter
isLastDayOfMonth bool
no setter
isToday bool
no setter
isTomorrow bool
no setter
isYesterday bool
no setter
lastDayOfMonth DateTime
The last day of a given month
no setter
lastDayOfWeek DateTime
no setter
nextDay DateTime
The day after this DateTime
no setter
nextMonth DateTime
no setter
nextWeek DateTime
no setter
previousDay DateTime
The day previous this DateTime
no setter
previousMonth DateTime
no setter
previousWeek DateTime
no setter
time Time
Returns only the time.
no setter

Methods

addDays(int amount) DateTime
Add a certain amount of days to this date
addHours(int amount) DateTime
Add a certain amount of hours to this date
isSameDay(DateTime b) bool
Whether or not two times are on the same day.
isSameWeek(DateTime b) bool

Static Properties

today DateTime
Current date (Same as Date.now)
no setter
tomorrow DateTime
Tomorrow at same hour / minute / second than now
no setter
yesterday DateTime
Yesterday at same hour / minute / second than now
no setter

Static Methods

daysInRange(DateTime start, DateTime end) Iterable<DateTime>
Returns a DateTime for each day the given range.