DateTimeExtension extension

on

Methods

addMonths(int count) DateTime

Available on DateTime, provided by the DateTimeExtension extension

Adds the specified number of months to this DateTime.
getDaysInMonth() int

Available on DateTime, provided by the DateTimeExtension extension

Returns the number of days in the month of this DateTime.
getTimeOfDayOnly() TimeOfDay

Available on DateTime, provided by the DateTimeExtension extension

Returns a TimeOfDay object representing the time part of this DateTime.
getWeekNumber() int

Available on DateTime, provided by the DateTimeExtension extension

Returns the week number of this DateTime within the year.
isBetween(DateTime start, DateTime end) bool

Available on DateTime, provided by the DateTimeExtension extension

Checks if this DateTime is between the start and end DateTimes (inclusive).
isFirstDayOfMonth() bool

Available on DateTime, provided by the DateTimeExtension extension

Checks if this DateTime is the first day of the month.
isFirstDayOfWeek() bool

Available on DateTime, provided by the DateTimeExtension extension

Checks if this DateTime is the first day of the week (Monday).
isFirstDayOfYear() bool

Available on DateTime, provided by the DateTimeExtension extension

Checks if this DateTime is the first day of the year.
isLastDayOfMonth() bool

Available on DateTime, provided by the DateTimeExtension extension

Checks if this DateTime is the last day of the month.
isLastDayOfWeek() bool

Available on DateTime, provided by the DateTimeExtension extension

Checks if this DateTime is the last day of the week (Sunday).
isLastDayOfYear() bool

Available on DateTime, provided by the DateTimeExtension extension

Checks if this DateTime is the last day of the year.
isSameDay(DateTime other) bool

Available on DateTime, provided by the DateTimeExtension extension

Checks if this DateTime represents the same day as the other DateTime.
isSameMonth(DateTime other) bool

Available on DateTime, provided by the DateTimeExtension extension

Checks if this DateTime represents the same month as the other DateTime.
nextMonthDay(int monthCount) DateTime

Available on DateTime, provided by the DateTimeExtension extension

Возвращает первый день следующего месяца
roundToDayEnd() DateTime

Available on DateTime, provided by the DateTimeExtension extension

Returns a new DateTime rounded to the end of the day (23:59:59).
roundToDayStart() DateTime

Available on DateTime, provided by the DateTimeExtension extension

Returns a new DateTime rounded to the start of the day (00:00:00).
roundToFirstDayOfMonth() DateTime

Available on DateTime, provided by the DateTimeExtension extension

Returns a new DateTime rounded to the first day of the month.
roundToFirstDayOfWeek() DateTime

Available on DateTime, provided by the DateTimeExtension extension

Returns a new DateTime rounded to the first day of the week (Monday).
roundToFirstDayOfYear() DateTime

Available on DateTime, provided by the DateTimeExtension extension

Returns a new DateTime rounded to the first day of the year.
roundToLastDayOfMonth() DateTime

Available on DateTime, provided by the DateTimeExtension extension

Returns a new DateTime rounded to the last day of the month.
roundToLastDayOfWeek() DateTime

Available on DateTime, provided by the DateTimeExtension extension

Returns a new DateTime rounded to the last day of the week (Sunday).
roundToLastDayOfYear() DateTime

Available on DateTime, provided by the DateTimeExtension extension

Returns a new DateTime rounded to the last day of the year.
subtractMonths(int count) DateTime

Available on DateTime, provided by the DateTimeExtension extension

Subtracts the specified number of months from this DateTime.
today() DateTime

Available on DateTime, provided by the DateTimeExtension extension

Returns a new DateTime object representing the current date at midnight (00:00:00).