Date

Explore what information is available for dates.

This type represents a local date as defined by the ISO 8601 standard.

Local dates are what most people think of when they talk about dates. They do not represent a specific point in time, but rather a day in the calendar. For example, the date 2025-01-01 represents the first day of the year 2025, regardless of the time of day or daylight savings time adjustments.

Range

The range of valid dates is from -999999999-01-01 to 999999999-12-31.

Properties

These are the available properties:

day

The day of the month, from 1 to 31.

weekday

The name of the day of the week, such as "monday" or "tuesday".

The name is always in lowercase and in English.

month

The month of the year, from 1 to 12.

year

The year, from -999999999 to 999999999.

This value follows the ISO 8601 standard and uses the proleptic numbering system. Therefore, year 1 is preceded by year 0, then by year -1.