DateTimeUtils extension
- on
Properties
- isAfternoon → bool
-
Available on DateTime, provided by the DateTimeUtils extension
Returntrueif is afternoon,falseotherwise. Afternoon is defined as 12:00 to 17:59.no setter - isEvening → bool
-
Available on DateTime, provided by the DateTimeUtils extension
Returntrueif is evening,falseotherwise. Evening is between 18 and 22.no setter - isFuture → bool
-
Available on DateTime, provided by the DateTimeUtils extension
Returnstrueif the date is in the future,falseotherwise.no setter - isHoliday → bool
-
Available on DateTime, provided by the DateTimeUtils extension
Returntrueif is holiday,falseotherwise. Holidays are defined as Saturday and Sunday.no setter - isLeapYear → bool
-
Available on DateTime, provided by the DateTimeUtils extension
Returntrueif is leap year,falseotherwise.no setter - isMorning → bool
-
Available on DateTime, provided by the DateTimeUtils extension
Returntrueif is morning,falseotherwise. Morning is defined as between 5am and 12pm.no setter - isNight → bool
-
Available on DateTime, provided by the DateTimeUtils extension
Returntrueif is night,falseotherwise. Night is between 23 and 5.no setter - isPast → bool
-
Available on DateTime, provided by the DateTimeUtils extension
Returnstrueif the date is in the past,falseotherwise.no setter - isToday → bool
-
Available on DateTime, provided by the DateTimeUtils extension
Returnstrueif the date is today,falseotherwise.no setter - isTomorrow → bool
-
Available on DateTime, provided by the DateTimeUtils extension
Returnstrueif the date is tomorrow,falseotherwise.no setter - isWeekday → bool
-
Available on DateTime, provided by the DateTimeUtils extension
Returntrueif is weekday,falseotherwise.no setter - isWeekend → bool
-
Available on DateTime, provided by the DateTimeUtils extension
Returntrueif is weekend,falseotherwise.no setter - isYesterday → bool
-
Available on DateTime, provided by the DateTimeUtils extension
Returnstrueif the date is yesterday,falseotherwise.no setter - season → String
-
Available on DateTime, provided by the DateTimeUtils extension
ReturnSeasonof the date. Seasons are defined as:no setter
Methods
-
daysUntil(
DateTime other) → int -
Available on DateTime, provided by the DateTimeUtils extension
Days untilother. Ifotheris 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 untilother. Ifotheris in the past, the result will be negative. -
isAheadByDays(
DateTime other, int days) → bool -
Available on DateTime, provided by the DateTimeUtils extension
Returntrueif the date is ahead ofotherbydays,falseotherwise. -
isBehindByDays(
DateTime other, int days) → bool -
Available on DateTime, provided by the DateTimeUtils extension
Returntrueif the date is behind ofotherbydays,falseotherwise. -
isInSeason(
String season) → bool -
Available on DateTime, provided by the DateTimeUtils extension
Returntrueif is inseason,falseotherwise. -
isSameDay(
DateTime other) → bool -
Available on DateTime, provided by the DateTimeUtils extension
Returnstrueif the date is in the same day asother,falseotherwise. -
isSameHour(
DateTime other) → bool -
Available on DateTime, provided by the DateTimeUtils extension
Returnstrueif the date is in the same hour asother,falseotherwise. -
isSameMillisecond(
DateTime other) → bool -
Available on DateTime, provided by the DateTimeUtils extension
Returnstrueif the date is in the same millisecond asother,falseotherwise. -
isSameMinute(
DateTime other) → bool -
Available on DateTime, provided by the DateTimeUtils extension
Returnstrueif the date is in the same minute asother,falseotherwise. -
isSameMonth(
DateTime other) → bool -
Available on DateTime, provided by the DateTimeUtils extension
Returnstrueif the date is in the same month asother,falseotherwise. -
isSameSecond(
DateTime other) → bool -
Available on DateTime, provided by the DateTimeUtils extension
Returnstrueif the date is in the same second asother,falseotherwise. -
isSameYear(
DateTime other) → bool -
Available on DateTime, provided by the DateTimeUtils extension
Returnstrueif the date is in the same year asother,falseotherwise.