Date Time
A date and time of day in an ambiguous region.
Parameters
the date
the time
Constructors
Types
Functions
Returns a copy of this date-time with the values of any individual components replaced by the new values specified.
The millisecond of the Unix epoch.
The number of milliseconds relative to the Unix epoch of 1970-01-01T00:00Z at a particular offset. This is a "floor" value, so 1 nanosecond before the Unix epoch will be at a distance of 1 millisecond.
Returns this date-time with centuries subtracted from it.
Returns this date-time with days subtracted from it.
Returns this date-time with decades subtracted from it.
Returns this date-time with hours subtracted from it.
Returns this date-time with microseconds subtracted from it.
Returns this date-time with milliseconds subtracted from it.
Returns this date-time with minutes subtracted from it.
Returns this date-time with months subtracted from it.
Returns this date-time with nanoseconds subtracted from it.
Returns this date-time with period subtracted from it.
Returns this date-time with seconds subtracted from it.
Returns this date-time with weeks subtracted from it.
Returns this date-time with years subtracted from it.
Returns this date-tme with centuries added to it.
Returns this date-time with days added to it.
Returns this date-time with decades added to it.
Returns this date-time with hours added to it.
Returns this date-time with microseconds added to it.
Returns this date-time with milliseconds added to it.
Returns this date-time with minutes added to it.
Returns this date-time with months added to it.
Returns this date-time with nanoseconds added to it.
Returns this date-time with period added to it.
Returns this date-time with seconds added to it.
Returns this date-time with weeks added to it.
Returns this date-time with years added to it.
The second of the Unix epoch.
The number of seconds relative to the Unix epoch of 1970-01-01T00:00Z at a particular offset. This is a "floor" value, so 1 nanosecond before the Unix epoch will be at a distance of 1 second.
Properties
The number of additional nanoseconds that should be applied on top of the number of seconds since the Unix epoch returned by secondsSinceUnixEpochAt.
Extensions
Combines a local date and time with a UTC offset to create an OffsetDateTime.
Combines a local date and time with a time zone to create a ZonedDateTime.
The date-time at the last representable instant of the month that this date-time falls in.
The date-time at the last representable instant of the ISO week that this date-time falls in.
The date-time at the last representable instant of the week that this date-time falls in. The first day of the week will be determined by the system settings. This may differ from the first day of the week associated with the default locale on platforms that allow this to be customized.
Checks if this date-time falls within February 29.
Checks if this date-time falls within a leap year.
The length of this date-time's month in days.
The length of the ISO week-based year that this date-time falls in, either 52 or 53 weeks.
The length of this date-time's year in days.
The next date-time that falls on dayOfWeek, or this date-time if it falls on the same day.
The previous date-time that falls on dayOfWeek, or this date-time if it falls on the same day.
Returns this date-time, rounded down to match the precision of a given unit.
Returns this date-time, rounded down to the nearest hour that satisfies the increment.
Returns this date-time, rounded down to the nearest minute that satisfies the increment.
Returns this date-time, rounded down to the nearest second that satisfies the increment.
Returns this date-time, rounded down to the nearest millisecond that satisfies the increment.
Returns this date-time, rounded down to the nearest microsecond that satisfies the increment.
Returns this date-time, rounded down to the nearest nanosecond that satisfies the increment.
Returns this date-time, rounded to the nearest hour that satisfies the increment. If the time is halfway between increments, it will be rounded up.
Returns this date-time, rounded to the nearest minute that satisfies the increment. If the time is halfway between increments, it will be rounded up.
Returns this date-time, rounded to the nearest second that satisfies the increment. If the time is halfway between increments, it will be rounded up.
Returns this date-time, rounded to the nearest millisecond that satisfies the increment. If the time is halfway between increments, it will be rounded up.
Returns this date-time, rounded to the nearest microsecond that satisfies the increment. If the time is halfway between increments, it will be rounded up.
Returns this date-time, rounded to the nearest nanosecond that satisfies the increment. If the time is halfway between increments, it will be rounded up.
Returns this date-time, rounded up to match the precision of a given unit.
Returns this date-time, rounded up to the nearest hour that satisfies the increment.
Returns this date-time, rounded up to the nearest minute that satisfies the increment.
Returns this date-time, rounded up to the nearest second that satisfies the increment.
Returns this date-time, rounded up to the nearest millisecond that satisfies the increment.
Returns this date-time, rounded up to the nearest microsecond that satisfies the increment.
Returns this date-time, rounded up to the nearest nanosecond that satisfies the increment.
The date-time at the first instant of the month that this date-time falls in.
The date-time at the first instant of the ISO week that this date-time falls in.
The date-time at the first instant of the week that this date-time falls in. The first day of the week will be determined by the system settings. This may differ from the first day of the week associated with the default locale on platforms that allow this to be customized.
The date-time at the first instant of the week that this date-time falls in. The first day of the week will be determined by locale.
The date-time at the first instant of the year that this date-time falls in.
Converts this date-time to an equivalent Java LocalDateTime.
Converts this date-time to an equivalent NSDateComponents object.
Returns this date-time with the precision reduced to the month.
Returns this date-time, rounded down to match the precision of a given unit.
Creates a DateTimeInterval from this date-time up to, but not including the nanosecond represented by to.
The interval defining the ISO week that this date-time falls within.
The interval defining the week that this date-time falls within. The first day of the week will be determined by the provided settings.
The interval defining the week that this date-time falls within. The first day of the week will be the default associated with the provided locale.
The week-based year used in the ISO week date system. This value differs from the regular ISO year when the week number falls in the preceding or following year.
The week-based year, calculated using the week definition in settings. This value differs from the regular ISO year when the week number falls in the preceding or following year.
The week-based year, calculated using the week definition associated with the provided locale. This value differs from the regular ISO year when the week number falls in the preceding or following year.
The week number used in the ISO week date system.
The week number of the week-based year, calculated using the week definition in settings.
The week number of the week-based year, calculated using the week definition associated with the provided locale.
The week of the year, calculated using the ISO week definition. If the week number is associated with the preceding year, 0 will be returned.
The week of the year, calculated using the week definition in settings. If the week number is associated with the preceding year, 0 will be returned.
The week of the year, calculated using the week definition associated with the provided locale. If the week number is associated with the preceding year, 0 will be returned.