DateTimeExtensions extension

on

Properties

endOfDay → DateTime

Available on DateTime, provided by the DateTimeExtensions extension

Returns the end of the day for the DateTime
no setter
isEvenHour → bool

Available on DateTime, provided by the DateTimeExtensions extension

Checks if the current hour is even
no setter
isEvenMinute → bool

Available on DateTime, provided by the DateTimeExtensions extension

Checks if the current minute is even
no setter
isInFuture → bool

Available on DateTime, provided by the DateTimeExtensions extension

Checks if the current date is in the future
no setter
isInPast → bool

Available on DateTime, provided by the DateTimeExtensions extension

Checks if the current date is in the past
no setter
isOddHour → bool

Available on DateTime, provided by the DateTimeExtensions extension

Checks if the current hour is odd
no setter
isOddMinute → bool

Available on DateTime, provided by the DateTimeExtensions extension

Checks if the current minute is odd
no setter
isToday → bool

Available on DateTime, provided by the DateTimeExtensions extension

Checks if the current date is today
no setter
isTomorrow → bool

Available on DateTime, provided by the DateTimeExtensions extension

Checks if the current date is tomorrow
no setter
isWeekend → bool

Available on DateTime, provided by the DateTimeExtensions extension

Checks if the date is a weekend
no setter
isYesterday → bool

Available on DateTime, provided by the DateTimeExtensions extension

Checks if the current date is yesterday
no setter
startOfDay → DateTime

Available on DateTime, provided by the DateTimeExtensions extension

Returns the start of the day for the DateTime
no setter

Methods

addHours(int hours) → DateTime

Available on DateTime, provided by the DateTimeExtensions extension

Adds a specified number of hours to the current DateTime
addMinutes(int minutes) → DateTime

Available on DateTime, provided by the DateTimeExtensions extension

Adds a specified number of minutes to the current DateTime
isSameDate(DateTime other) → bool

Available on DateTime, provided by the DateTimeExtensions extension

Checks if the current date is on the same day as other
isSameMonth(DateTime other) → bool

Available on DateTime, provided by the DateTimeExtensions extension

Checks if the current date is in the same month as other
isSameWeek(DateTime other) → bool

Available on DateTime, provided by the DateTimeExtensions extension

Checks if the current date is in the same week as other
isSameYear(DateTime other) → bool

Available on DateTime, provided by the DateTimeExtensions extension

Checks if the current date is in the same year as other
isTimeWithinRange(TimeOfDay start, TimeOfDay end) → bool

Available on DateTime, provided by the DateTimeExtensions extension

Checks if the current time is within a time range (ignores date)
isWithinNextHours(int hours) → bool

Available on DateTime, provided by the DateTimeExtensions extension

Checks if the current time is within the next N hours
isWithinNextMinutes(int minutes) → bool

Available on DateTime, provided by the DateTimeExtensions extension

Checks if the current time is within the next N minutes
isWithinPastHours(int hours) → bool

Available on DateTime, provided by the DateTimeExtensions extension

Checks if the current time is within the past N hours
isWithinPastMinutes(int minutes) → bool

Available on DateTime, provided by the DateTimeExtensions extension

Checks if the current time is within the past N minutes
isWithinRange(DateTime start, DateTime end) → bool

Available on DateTime, provided by the DateTimeExtensions extension

Checks if the current date falls within a range of start and end
subtractHours(int hours) → DateTime

Available on DateTime, provided by the DateTimeExtensions extension

Subtracts a specified number of hours from the current DateTime
subtractMinutes(int minutes) → DateTime

Available on DateTime, provided by the DateTimeExtensions extension

Subtracts a specified number of minutes from the current DateTime