FHUDateExtensions 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
lastDayOfMonth DateTime
The last day of a given month
no setter
lastDayOfWeek DateTime
no setter
local DateTime
no setter
nextDay DateTime
The day after this DateTime
no setter
nextMonth DateTime
no setter
nextWeek DateTime
no setter
passedDays int
no setter
passedDuration Duration
no setter
previousDay DateTime
The day previous this DateTime
no setter
previousMonth DateTime
no setter
previousWeek DateTime
no setter
remainingDays int
no setter
remainingDuration Duration
no setter
startOfDay DateTime
Start time of Date times
no setter
startOfMonth DateTime
no setter
startOfYear DateTime
no setter
tomorrow DateTime
next day
no setter
toUtcIso String
no setter
yesterday DateTime
last day
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
addOrRemoveDay(int days) DateTime
to add days to a DateTime add a positive number to remove days pass a negative number
addOrRemoveMinutes(int min) DateTime
to add min to a DateTime add a positive number to remove min pass a negative number
addOrRemoveMonth(int months) DateTime
to add month to a DateTime add a positive number to remove years pass a negative number
addOrRemoveSeconds(int sec) DateTime
to add sec to a DateTime add a positive number to remove sec pass a negative number
addOrRemoveYears(int years) DateTime
to add years to a DateTime add a positive number to remove years pass a negative number
format(String format) String
isAtSameDayAs(DateTime other) bool
Returns true if other is on the same day as this.
isAtSameHourAs(DateTime other) bool
Returns true if other is at the same hour as this.
isAtSameMicrosecondAs(DateTime other) bool
Returns true if other is at the same microsecond as this.
isAtSameMillisecondAs(DateTime other) bool
Returns true if other is at the same millisecond as this.
isAtSameMinuteAs(DateTime other) bool
Returns true if other is at the same minute as this.
isAtSameMonthAs(DateTime other) bool
Returns true if other is in the same month as this.
isAtSameSecondAs(DateTime other) bool
Returns true if other is at the same second as this.
isAtSameYearAs(DateTime other) bool
Returns true if other is in the same year as this.
max(DateTime that) DateTime
min(DateTime that) DateTime
return the smaller date between

Operators

operator +(Duration duration) DateTime
Adds this DateTime and Duration and returns the sum as a new DateTime object.
operator -(Duration duration) DateTime
Subtracts the Duration from this DateTime returns the difference as a new DateTime object.