DateTimeExtension extension

Extension on the DateTime class providing additional functionality related to date and time.

on

Properties

isThisYear bool

Available on DateTime, provided by the DateTimeExtension extension

Indicates whether the DateTime object belongs to the same year as the current date and time.
no setter
isToday bool

Available on DateTime, provided by the DateTimeExtension extension

Indicates whether the DateTime object represents today's date.
no setter
isYesterday bool

Available on DateTime, provided by the DateTimeExtension extension

Indicates whether the DateTime object represents yesterday's date.
no setter

Methods

isAfterOrEqual(DateTime dateTime) bool

Available on DateTime, provided by the DateTimeExtension extension

Checks if the current DateTime instance is after or equal to the given dateTime. Returns true if it is, false otherwise.
isBeforeOrEqual(DateTime dateTime) bool

Available on DateTime, provided by the DateTimeExtension extension

Checks if the current DateTime instance is before or equal to the given dateTime. Returns true if it is, false otherwise.
isBetween(DateTime fromDateTime, DateTime toDateTime) bool

Available on DateTime, provided by the DateTimeExtension extension

Checks if the current DateTime instance falls between the provided fromDateTime and toDateTime.
isSameDay(DateTime date) bool

Available on DateTime, provided by the DateTimeExtension extension

Indicates whether two DateTime objects are on the same day.
isSameMonth(DateTime date) bool

Available on DateTime, provided by the DateTimeExtension extension

Indicates whether two DateTime objects are in the same month.
isSameYear(DateTime date) bool

Available on DateTime, provided by the DateTimeExtension extension

Indicates whether two DateTime objects are in the same year.