DateTimeUtils extension
- on
Properties
- isAfternoon → bool
-
Available on DateTime, provided by the DateTimeUtils extension
Returntrue
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
Returntrue
if is evening,false
otherwise. Evening is between 18 and 22.no setter - isFuture → bool
-
Available on DateTime, provided by the DateTimeUtils extension
Returnstrue
if the date is in the future,false
otherwise.no setter - isHoliday → bool
-
Available on DateTime, provided by the DateTimeUtils extension
Returntrue
if is holiday,false
otherwise. Holidays are defined as Saturday and Sunday.no setter - isLeapYear → bool
-
Available on DateTime, provided by the DateTimeUtils extension
Returntrue
if is leap year,false
otherwise.no setter - isMorning → bool
-
Available on DateTime, provided by the DateTimeUtils extension
Returntrue
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
Returntrue
if is night,false
otherwise. Night is between 23 and 5.no setter - isPast → bool
-
Available on DateTime, provided by the DateTimeUtils extension
Returnstrue
if the date is in the past,false
otherwise.no setter - isToday → bool
-
Available on DateTime, provided by the DateTimeUtils extension
Returnstrue
if the date is today,false
otherwise.no setter - isTomorrow → bool
-
Available on DateTime, provided by the DateTimeUtils extension
Returnstrue
if the date is tomorrow,false
otherwise.no setter - isWeekday → bool
-
Available on DateTime, provided by the DateTimeUtils extension
Returntrue
if is weekday,false
otherwise.no setter - isWeekend → bool
-
Available on DateTime, provided by the DateTimeUtils extension
Returntrue
if is weekend,false
otherwise.no setter - isYesterday → bool
-
Available on DateTime, provided by the DateTimeUtils extension
Returnstrue
if the date is yesterday,false
otherwise.no setter - season → String
-
Available on DateTime, provided by the DateTimeUtils extension
ReturnSeason
of the date. Seasons are defined as:no setter
Methods
-
daysUntil(
DateTime other) → int -
Available on DateTime, provided by the DateTimeUtils extension
Days untilother
. Ifother
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 untilother
. Ifother
is in the past, the result will be negative. -
isAheadByDays(
DateTime other, int days) → bool -
Available on DateTime, provided by the DateTimeUtils extension
Returntrue
if the date is ahead ofother
bydays
,false
otherwise. -
isBehindByDays(
DateTime other, int days) → bool -
Available on DateTime, provided by the DateTimeUtils extension
Returntrue
if the date is behind ofother
bydays
,false
otherwise. -
isInSeason(
String season) → bool -
Available on DateTime, provided by the DateTimeUtils extension
Returntrue
if is inseason
,false
otherwise. -
isSameDay(
DateTime other) → bool -
Available on DateTime, provided by the DateTimeUtils extension
Returnstrue
if the date is in the same day asother
,false
otherwise. -
isSameHour(
DateTime other) → bool -
Available on DateTime, provided by the DateTimeUtils extension
Returnstrue
if the date is in the same hour asother
,false
otherwise. -
isSameMillisecond(
DateTime other) → bool -
Available on DateTime, provided by the DateTimeUtils extension
Returnstrue
if the date is in the same millisecond asother
,false
otherwise. -
isSameMinute(
DateTime other) → bool -
Available on DateTime, provided by the DateTimeUtils extension
Returnstrue
if the date is in the same minute asother
,false
otherwise. -
isSameMonth(
DateTime other) → bool -
Available on DateTime, provided by the DateTimeUtils extension
Returnstrue
if the date is in the same month asother
,false
otherwise. -
isSameSecond(
DateTime other) → bool -
Available on DateTime, provided by the DateTimeUtils extension
Returnstrue
if the date is in the same second asother
,false
otherwise. -
isSameYear(
DateTime other) → bool -
Available on DateTime, provided by the DateTimeUtils extension
Returnstrue
if the date is in the same year asother
,false
otherwise.