DateTimeUtils extension

on

Properties

isAfternoon bool

Available on DateTime, provided by the DateTimeUtils extension

Return true if is afternoon, false otherwise. Afternoon is defined as 12:00 to 17:59.
no setter
isEvening bool

Available on DateTime, provided by the DateTimeUtils extension

Return true if is evening, false otherwise. Evening is between 18 and 22.
no setter
isFuture bool

Available on DateTime, provided by the DateTimeUtils extension

Returns true if the date is in the future, false otherwise.
no setter
isHoliday bool

Available on DateTime, provided by the DateTimeUtils extension

Return true if is holiday, false otherwise. Holidays are defined as Saturday and Sunday.
no setter
isLeapYear bool

Available on DateTime, provided by the DateTimeUtils extension

Return true if is leap year, false otherwise.
no setter
isMorning bool

Available on DateTime, provided by the DateTimeUtils extension

Return true if is morning, false otherwise. Morning is defined as between 5am and 12pm.
no setter
isNight bool

Available on DateTime, provided by the DateTimeUtils extension

Return true if is night, false otherwise. Night is between 23 and 5.
no setter
isPast bool

Available on DateTime, provided by the DateTimeUtils extension

Returns true if the date is in the past, false otherwise.
no setter
isToday bool

Available on DateTime, provided by the DateTimeUtils extension

Returns true if the date is today, false otherwise.
no setter
isTomorrow bool

Available on DateTime, provided by the DateTimeUtils extension

Returns true if the date is tomorrow, false otherwise.
no setter
isWeekday bool

Available on DateTime, provided by the DateTimeUtils extension

Return true if is weekday, false otherwise.
no setter
isWeekend bool

Available on DateTime, provided by the DateTimeUtils extension

Return true if is weekend, false otherwise.
no setter
isYesterday bool

Available on DateTime, provided by the DateTimeUtils extension

Returns true if the date is yesterday, false otherwise.
no setter
season String

Available on DateTime, provided by the DateTimeUtils extension

Return Season of the date. Seasons are defined as:
no setter

Methods

daysUntil(DateTime other) int

Available on DateTime, provided by the DateTimeUtils extension

Days until other. If other is in the past, the result will be negative.
daysUntilEndOfYear() int

Available on DateTime, provided by the DateTimeUtils extension

Days until end of year.
daysUntilWeekend() int

Available on DateTime, provided by the DateTimeUtils extension

Return days until the weekend. If the date is in the weekend, the result will be 0.
hoursUntil(DateTime other) int

Available on DateTime, provided by the DateTimeUtils extension

Hours until other. If other is in the past, the result will be negative.
isAheadByDays(DateTime other, int days) bool

Available on DateTime, provided by the DateTimeUtils extension

Return true if the date is ahead of other by days, false otherwise.
isBehindByDays(DateTime other, int days) bool

Available on DateTime, provided by the DateTimeUtils extension

Return true if the date is behind of other by days, false otherwise.
isInSeason(String season) bool

Available on DateTime, provided by the DateTimeUtils extension

Return true if is in season, false otherwise.
isSameDay(DateTime other) bool

Available on DateTime, provided by the DateTimeUtils extension

Returns true if the date is in the same day as other, false otherwise.
isSameHour(DateTime other) bool

Available on DateTime, provided by the DateTimeUtils extension

Returns true if the date is in the same hour as other, false otherwise.
isSameMillisecond(DateTime other) bool

Available on DateTime, provided by the DateTimeUtils extension

Returns true if the date is in the same millisecond as other, false otherwise.
isSameMinute(DateTime other) bool

Available on DateTime, provided by the DateTimeUtils extension

Returns true if the date is in the same minute as other, false otherwise.
isSameMonth(DateTime other) bool

Available on DateTime, provided by the DateTimeUtils extension

Returns true if the date is in the same month as other, false otherwise.
isSameSecond(DateTime other) bool

Available on DateTime, provided by the DateTimeUtils extension

Returns true if the date is in the same second as other, false otherwise.
isSameYear(DateTime other) bool

Available on DateTime, provided by the DateTimeUtils extension

Returns true if the date is in the same year as other, false otherwise.