Zoned Date Time
A date and time of day in a particular region.
ZonedDateTime takes time zone rules into account when performing calendrical calculations.
Types
Functions
Changes the time zone of a ZonedDateTime, adjusting the date, time, and offset such that the instant represented by it remains the same.
Returns a copy of this date-time with the values of any individual components replaced by the new values specified.
Checks if this time point represents the same instant as other. Unlike the equals operator, equality is determined solely by timeline order.
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-time with duration 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.
Returns this date-time with duration added to it.
If the local date-time falls during an overlap caused by a daylight savings transition, a ZonedDateTime with the same local date and time will be returned, but using the earlier of the two valid offsets.
If this date-time uses a region-based time zone, a copy with a fixed offset will be returned. Otherwise, this date-time will be returned unchanged.
If the local date-time falls during an overlap caused by a daylight savings transition, a ZonedDateTime with the same local date and time will be returned, but using the later of the two valid offsets.
Properties
The number of additional nanoseconds on top of secondsSinceUnixEpoch.
Extensions
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 user's system settings. This may differ from the first day of the week associated with the default locale on platforms that allow the user to customize this.
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 locale.
The date-time at the last representable instant of the year that this date-time falls in.
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 user's system settings. This may differ from the first day of the week associated with the default locale on platforms that allow the user to customize this.
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 ZonedDateTime.
Converts this date-time to an equivalent NSDateComponents object.
Returns the combined date, time, and UTC offset.
Returns the combined time and UTC offset.
Returns this date-time with the precision reduced to the year.
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 ZonedDateTimeInterval from this date-time up to, but not including 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.