FlexiDateTimeExtension extension

on

Properties

dayOfWeek int

Available on DateTime, provided by the FlexiDateTimeExtension extension

Gets the day of the week, adjusted for the start of the week.
no setter
dayOfYear int

Available on DateTime, provided by the FlexiDateTimeExtension extension

Gets the day of the year.
no setter
daysInMonth int

Available on DateTime, provided by the FlexiDateTimeExtension extension

Gets the number of days in the month.
no setter
endOfDay DateTime

Available on DateTime, provided by the FlexiDateTimeExtension extension

Returns the end of the day.
no setter
endOfMonth DateTime

Available on DateTime, provided by the FlexiDateTimeExtension extension

Returns the end of the month.
no setter
endOfQuarter DateTime

Available on DateTime, provided by the FlexiDateTimeExtension extension

Returns the end of the quarter.
no setter
endOfWeek DateTime

Available on DateTime, provided by the FlexiDateTimeExtension extension

Returns the end of the week.
no setter
endOfYear DateTime

Available on DateTime, provided by the FlexiDateTimeExtension extension

Returns the end of the year.
no setter
isFuture bool

Available on DateTime, provided by the FlexiDateTimeExtension extension

Checks if the DateTime is in the future.
no setter
isLeapYear bool

Available on DateTime, provided by the FlexiDateTimeExtension extension

Checks if the year is a leap year.
no setter
isLocal bool

Available on DateTime, provided by the FlexiDateTimeExtension extension

Checks if the DateTime is set as local time.
no setter
isPast bool

Available on DateTime, provided by the FlexiDateTimeExtension extension

Checks if the DateTime is in the past.
no setter
isToday bool

Available on DateTime, provided by the FlexiDateTimeExtension extension

Checks if the DateTime is today.
no setter
isTomorrow bool

Available on DateTime, provided by the FlexiDateTimeExtension extension

Checks if the DateTime is tomorrow.
no setter
isWeekend bool

Available on DateTime, provided by the FlexiDateTimeExtension extension

Checks if the DateTime is a weekday.
no setter
isYesterday bool

Available on DateTime, provided by the FlexiDateTimeExtension extension

Checks if the DateTime is yesterday.
no setter
quarterOfYear int

Available on DateTime, provided by the FlexiDateTimeExtension extension

Gets the quarter of the year.
no setter
startOfDay DateTime

Available on DateTime, provided by the FlexiDateTimeExtension extension

Returns the start of the day.
no setter
startOfMonth DateTime

Available on DateTime, provided by the FlexiDateTimeExtension extension

Returns the start of the month.
no setter
startOfQuarter DateTime

Available on DateTime, provided by the FlexiDateTimeExtension extension

Returns the start of the quarter.
no setter
startOfWeek DateTime

Available on DateTime, provided by the FlexiDateTimeExtension extension

Returns the start of the week.
no setter
startOfYear DateTime

Available on DateTime, provided by the FlexiDateTimeExtension extension

Returns the start of the year.
no setter
weekOfYear int

Available on DateTime, provided by the FlexiDateTimeExtension extension

Gets the week number of the year
no setter

Methods

addDate({int microseconds = 0, int milliseconds = 0, int seconds = 0, int minutes = 0, int hours = 0, int days = 0, int weeks = 0, int months = 0, int years = 0}) DateTime

Available on DateTime, provided by the FlexiDateTimeExtension extension

Adds the specified duration to the DateTime.
addDays(int amount) DateTime

Available on DateTime, provided by the FlexiDateTimeExtension extension

Adds an amount of days to this DateTime
addHours(int amount) DateTime

Available on DateTime, provided by the FlexiDateTimeExtension extension

Adds an amount of hours to this DateTime
addMicroseconds(int amount) DateTime

Available on DateTime, provided by the FlexiDateTimeExtension extension

Adds an amount of microseconds to this DateTime
addMilliseconds(int amount) DateTime

Available on DateTime, provided by the FlexiDateTimeExtension extension

Adds an amount of milliseconds to this DateTime
addMinutes(int amount) DateTime

Available on DateTime, provided by the FlexiDateTimeExtension extension

Adds an amount of minutes to this DateTime
addMonths(int amount) DateTime

Available on DateTime, provided by the FlexiDateTimeExtension extension

Adds an amount of months to this DateTime
addSeconds(int amount) DateTime

Available on DateTime, provided by the FlexiDateTimeExtension extension

Adds an amount of seconds to this DateTime
addWeeks(int amount) DateTime

Available on DateTime, provided by the FlexiDateTimeExtension extension

Adds an amount of weeks to this DateTime
addYears(int amount) DateTime

Available on DateTime, provided by the FlexiDateTimeExtension extension

Adds an amount of years to this DateTime
clone() DateTime

Available on DateTime, provided by the FlexiDateTimeExtension extension

Returns a copy of the DateTime.
closestDayTo(Iterable<DateTime> dates) DateTime?

Available on DateTime, provided by the FlexiDateTimeExtension extension

Get the closest day to the current one. Returns null if the list is empty.
diff(DateTime other, {TimeUnit unit = TimeUnit.microsecond, bool asFloat = false}) num

Available on DateTime, provided by the FlexiDateTimeExtension extension

Returns the difference between two DateTime objects in the specified unit of time.
diffInDays(DateTime other, {bool asFloat = false}) num

Available on DateTime, provided by the FlexiDateTimeExtension extension

Returns the difference between two DateTime objects in days.
diffInHours(DateTime other, {bool asFloat = false}) num

Available on DateTime, provided by the FlexiDateTimeExtension extension

Returns the difference between two DateTime objects in hours.
diffInMilliseconds(DateTime other, {bool asFloat = false}) num

Available on DateTime, provided by the FlexiDateTimeExtension extension

Returns the difference between two DateTime objects in milliseconds.
diffInMinutes(DateTime other, {bool asFloat = false}) num

Available on DateTime, provided by the FlexiDateTimeExtension extension

Returns the difference between two DateTime objects in minutes.
diffInMonths(DateTime other, {bool asFloat = false}) num

Available on DateTime, provided by the FlexiDateTimeExtension extension

Returns the difference between two DateTime objects in months.
diffInSeconds(DateTime other, {bool asFloat = false}) num

Available on DateTime, provided by the FlexiDateTimeExtension extension

diffInWeeks(DateTime other, {bool asFloat = false}) num

Available on DateTime, provided by the FlexiDateTimeExtension extension

Returns the difference between two DateTime objects in weeks.
diffInYears(DateTime other, {bool asFloat = false}) num

Available on DateTime, provided by the FlexiDateTimeExtension extension

Returns the difference between two DateTime objects in years.
endOf(TimeUnit unit) DateTime

Available on DateTime, provided by the FlexiDateTimeExtension extension

Returns the end of the specified unit of time.
indexOfClosestDay(Iterable<DateTime> dates) int

Available on DateTime, provided by the FlexiDateTimeExtension extension

Get the index of the closest day in the dates list.
isAfterDate(DateTime other, {TimeUnit unit = TimeUnit.microsecond}) bool

Available on DateTime, provided by the FlexiDateTimeExtension extension

Checks if the DateTime is after the specified DateTime in the given unit of time.
isBeforeDate(DateTime other, {TimeUnit unit = TimeUnit.microsecond}) bool

Available on DateTime, provided by the FlexiDateTimeExtension extension

Checks if the DateTime is before the specified DateTime in the given unit of time.
isBetween(DateTime startDateTime, DateTime endDateTime, {TimeUnit unit = TimeUnit.microsecond}) bool

Available on DateTime, provided by the FlexiDateTimeExtension extension

Checks if the DateTime is between the specified start and end DateTime in the given unit of time.
isSame(DateTime other, {TimeUnit unit = TimeUnit.microsecond}) bool

Available on DateTime, provided by the FlexiDateTimeExtension extension

Checks if the DateTime is the same as the specified DateTime in the given unit of time.
isSameDay(DateTime other) bool

Available on DateTime, provided by the FlexiDateTimeExtension extension

Checks if the DateTime is in the same day as the specified DateTime.
isSameHour(DateTime other) bool

Available on DateTime, provided by the FlexiDateTimeExtension extension

Checks if the DateTime is in the same hour as the specified DateTime.
isSameMinute(DateTime other) bool

Available on DateTime, provided by the FlexiDateTimeExtension extension

Checks if the DateTime is in the same minute as the specified DateTime.
isSameMonth(DateTime other) bool

Available on DateTime, provided by the FlexiDateTimeExtension extension

Checks if the DateTime is in the same month as the specified DateTime.
isSameOrAfter(DateTime other, {TimeUnit unit = TimeUnit.microsecond}) bool

Available on DateTime, provided by the FlexiDateTimeExtension extension

Checks if the DateTime is the same or after the specified DateTime in the given unit of time.
isSameOrBefore(DateTime other, {TimeUnit unit = TimeUnit.microsecond}) bool

Available on DateTime, provided by the FlexiDateTimeExtension extension

Checks if the DateTime is the same or before the specified DateTime in the given unit of time.
isSameSecond(DateTime other) bool

Available on DateTime, provided by the FlexiDateTimeExtension extension

Checks if the DateTime is in the same second as the specified DateTime.
isSameWeek(DateTime other) bool

Available on DateTime, provided by the FlexiDateTimeExtension extension

Checks if the DateTime is in the same week as the specified DateTime.
isSameYear(DateTime other) bool

Available on DateTime, provided by the FlexiDateTimeExtension extension

Checks if the DateTime is in the same year as the specified DateTime.
startOf(TimeUnit unit) DateTime

Available on DateTime, provided by the FlexiDateTimeExtension extension

Returns the start of the specified unit of time.
subDays(int amount) DateTime

Available on DateTime, provided by the FlexiDateTimeExtension extension

Subtracts an amount of days from this DateTime
subHours(int amount) DateTime

Available on DateTime, provided by the FlexiDateTimeExtension extension

Subtracts an amount of hours from this DateTime
subMicroseconds(int amount) DateTime

Available on DateTime, provided by the FlexiDateTimeExtension extension

Subtracts an amount of microseconds from this DateTime
subMilliseconds(int amount) DateTime

Available on DateTime, provided by the FlexiDateTimeExtension extension

Subtracts an amount of milliseconds from this DateTime
subMinutes(int amount) DateTime

Available on DateTime, provided by the FlexiDateTimeExtension extension

Subtracts an amount of minutes from this DateTime
subMonths(int amount) DateTime

Available on DateTime, provided by the FlexiDateTimeExtension extension

Subtracts an amount of months from this DateTime
subSeconds(int amount) DateTime

Available on DateTime, provided by the FlexiDateTimeExtension extension

Subtracts an amount of seconds from this DateTime
subtractDate({int microseconds = 0, int milliseconds = 0, int seconds = 0, int minutes = 0, int hours = 0, int days = 0, int weeks = 0, int months = 0, int years = 0}) DateTime

Available on DateTime, provided by the FlexiDateTimeExtension extension

Subtracts the specified duration from the DateTime.
subWeeks(int amount) DateTime

Available on DateTime, provided by the FlexiDateTimeExtension extension

Subtracts an amount of weeks from this DateTime
subYears(int amount) DateTime

Available on DateTime, provided by the FlexiDateTimeExtension extension

Adds an amount of years to this DateTime