class ZonedDateTime : TimePoint<ZonedDateTime>
A date and time of day in a particular region.
ZonedDateTime takes time zone rules into account when performing calendrical calculations.
(iosArm64, iosX64, jvm, macosX64)
date |
The local date. val date: Date |
(iosArm64, iosX64, jvm, macosX64)
dateTime |
The local date and time of day. val dateTime: DateTime |
(iosArm64, iosX64, jvm, macosX64)
dayOfMonth |
The day of the month. val dayOfMonth: Int |
(iosArm64, iosX64, jvm, macosX64)
dayOfWeek |
The day of the week. val dayOfWeek: DayOfWeek |
(iosArm64, iosX64, jvm, macosX64)
dayOfYear |
The day of the year -- also known as the ordinal date in ISO-8601. val dayOfYear: Int |
(iosArm64, iosX64, jvm, macosX64)
hour |
The hour of the day. val hour: Int |
(iosArm64, iosX64, jvm, macosX64)
instant |
The Instant representing the same time point. val instant: Instant |
(iosArm64, iosX64, jvm, macosX64)
isInLeapYear |
Check if this date falls within a leap year. val isInLeapYear: Boolean |
(iosArm64, iosX64, jvm, macosX64)
isLeapDay |
Check if this is a leap day. val isLeapDay: Boolean |
(iosArm64, iosX64, jvm, macosX64)
lengthOfMonth |
The length of this date's month in days. val lengthOfMonth: IntDays |
(iosArm64, iosX64, jvm, macosX64)
lengthOfYear |
The length of this date's year in days. val lengthOfYear: IntDays |
(iosArm64, iosX64, jvm, macosX64)
millisecondsSinceUnixEpoch |
The number of milliseconds since the Unix epoch of 1970-01-01T00:00Z val millisecondsSinceUnixEpoch: LongMilliseconds |
(iosArm64, iosX64, jvm, macosX64)
minute |
The minute of the hour. val minute: Int |
(iosArm64, iosX64, jvm, macosX64)
month |
The month of the year. val month: Month |
(iosArm64, iosX64, jvm, macosX64)
monthNumber |
The ISO month number, from 1-12. val monthNumber: Int |
(iosArm64, iosX64, jvm, macosX64)
nanoOfSecondsSinceUnixEpoch |
The number of additional nanoseconds on top of secondsSinceUnixEpoch val nanoOfSecondsSinceUnixEpoch: IntNanoseconds |
(iosArm64, iosX64, jvm, macosX64)
nanosecond |
The nanosecond of the second. val nanosecond: Int |
(iosArm64, iosX64, jvm, macosX64)
offset |
The offset from UTC. val offset: UtcOffset |
(iosArm64, iosX64, jvm, macosX64)
second |
The second of the minute. val second: Int |
(iosArm64, iosX64, jvm, macosX64)
secondsSinceUnixEpoch |
The number of seconds since the Unix epoch of 1970-01-01T00:00Z val secondsSinceUnixEpoch: LongSeconds |
(iosArm64, iosX64, jvm, macosX64)
time |
The local time of day. val time: Time |
(iosArm64, iosX64, jvm, macosX64)
year |
The year. val year: Int |
(iosArm64, iosX64, jvm, macosX64)
yearMonth |
The combined year and month. val yearMonth: YearMonth |
(iosArm64, iosX64, jvm, macosX64)
zone |
The time zone. val zone: TimeZone |
(iosArm64, iosX64, jvm, macosX64)
adjustedTo |
Change the time zone of a ZonedDateTime, adjusting the date, time, and offset such that the instant represented by it remains the same. fun adjustedTo(newTimeZone: TimeZone): ZonedDateTime |
(iosArm64, iosX64, jvm, macosX64)
copy |
Return a new ZonedDateTime, replacing any of the components with new values. fun copy(dateTime: DateTime = this.dateTime, offset: UtcOffset = this.offset, zone: TimeZone = this.zone): ZonedDateTimefun copy(date: Date = this.date, time: Time = this.time, offset: UtcOffset = this.offset, zone: TimeZone = this.zone): ZonedDateTimefun copy(year: Int = this.year, dayOfYear: Int = this.dayOfYear, hour: Int = this.hour, minute: Int = this.minute, second: Int = this.second, nanosecond: Int = this.nanosecond, offset: UtcOffset = this.offset, zone: TimeZone = this.zone): ZonedDateTimefun copy(year: Int = this.year, month: Month = this.month, dayOfMonth: Int = this.dayOfMonth, hour: Int = this.hour, minute: Int = this.minute, second: Int = this.second, nanosecond: Int = this.nanosecond, offset: UtcOffset = this.offset, zone: TimeZone = this.zone): ZonedDateTimefun copy(year: Int = this.year, monthNumber: Int, dayOfMonth: Int = this.dayOfMonth, hour: Int = this.hour, minute: Int = this.minute, second: Int = this.second, nanosecond: Int = this.nanosecond, offset: UtcOffset = this.offset, zone: TimeZone = this.zone): ZonedDateTime |
(iosArm64, iosX64, jvm, macosX64)
equals |
fun equals(other: Any?): Boolean |
(iosArm64, iosX64, jvm, macosX64)
hashCode |
fun hashCode(): Int |
(iosArm64, iosX64, jvm, macosX64)
minus |
Return a ZonedDateTime with period subtracted from it. operator fun minus(period: Period): ZonedDateTimeoperator fun minus(duration: Duration): ZonedDateTimeoperator fun minus(years: IntYears): ZonedDateTimeoperator fun minus(years: LongYears): ZonedDateTimeoperator fun minus(months: IntMonths): ZonedDateTimeoperator fun minus(months: LongMonths): ZonedDateTimeoperator fun minus(weeks: IntWeeks): ZonedDateTimeoperator fun minus(weeks: LongWeeks): ZonedDateTimeoperator fun minus(days: IntDays): ZonedDateTimeoperator fun minus(days: LongDays): ZonedDateTimeoperator fun minus(hours: IntHours): ZonedDateTimeoperator fun minus(hours: LongHours): ZonedDateTimeoperator fun minus(minutes: IntMinutes): ZonedDateTimeoperator fun minus(minutes: LongMinutes): ZonedDateTimeoperator fun minus(seconds: IntSeconds): ZonedDateTimeoperator fun minus(seconds: LongSeconds): ZonedDateTimeoperator fun minus(milliseconds: IntMilliseconds): ZonedDateTimeoperator fun minus(milliseconds: LongMilliseconds): ZonedDateTimeoperator fun minus(microseconds: IntMicroseconds): ZonedDateTimeoperator fun minus(microseconds: LongMicroseconds): ZonedDateTimeoperator fun minus(nanoseconds: IntNanoseconds): ZonedDateTimeoperator fun minus(nanoseconds: LongNanoseconds): ZonedDateTime |
(iosArm64, iosX64, jvm, macosX64)
plus |
Return a ZonedDateTime with period added to it. operator fun plus(period: Period): ZonedDateTimeoperator fun plus(duration: Duration): ZonedDateTimeoperator fun plus(years: IntYears): ZonedDateTimeoperator fun plus(years: LongYears): ZonedDateTimeoperator fun plus(months: IntMonths): ZonedDateTimeoperator fun plus(months: LongMonths): ZonedDateTimeoperator fun plus(weeks: IntWeeks): ZonedDateTimeoperator fun plus(weeks: LongWeeks): ZonedDateTimeoperator fun plus(days: IntDays): ZonedDateTimeoperator fun plus(days: LongDays): ZonedDateTimeoperator fun plus(hours: IntHours): ZonedDateTimeoperator fun plus(hours: LongHours): ZonedDateTimeoperator fun plus(minutes: IntMinutes): ZonedDateTimeoperator fun plus(minutes: LongMinutes): ZonedDateTimeoperator fun plus(seconds: IntSeconds): ZonedDateTimeoperator fun plus(seconds: LongSeconds): ZonedDateTimeoperator fun plus(milliseconds: IntMilliseconds): ZonedDateTimeoperator fun plus(milliseconds: LongMilliseconds): ZonedDateTimeoperator fun plus(microseconds: IntMicroseconds): ZonedDateTimeoperator fun plus(microseconds: LongMicroseconds): ZonedDateTimeoperator fun plus(nanoseconds: IntNanoseconds): ZonedDateTimeoperator fun plus(nanoseconds: LongNanoseconds): ZonedDateTime |
(iosArm64, iosX64, jvm, macosX64)
rangeTo |
operator fun rangeTo(other: ZonedDateTime): ZonedDateTimeInterval |
(iosArm64, iosX64, jvm, macosX64)
toString |
fun toString(): String |
(iosArm64, iosX64, jvm, macosX64)
withEarlierOffsetAtOverlap |
If the local date-time falls during an overlap caused by a daylight savings transition, return a ZonedDateTime with the same local date and time, but using the earlier of the two valid offsets. fun withEarlierOffsetAtOverlap(): ZonedDateTime |
(iosArm64, iosX64, jvm, macosX64)
withFixedOffsetZone |
If this date-time uses a region-based time zone, return a copy with a fixed offset. Otherwise, return this date-time, unchanged. fun withFixedOffsetZone(): ZonedDateTime |
(iosArm64, iosX64, jvm, macosX64)
withLaterOffsetAtOverlap |
If the local date-time falls during an overlap caused by a daylight savings transition, return a ZonedDateTime with the same local date and time, but using the later of the two valid offsets. fun withLaterOffsetAtOverlap(): ZonedDateTime |
DEFAULT_SORT_ORDER |
Compare by instant, then date-time, then time zone. Using this val DEFAULT_SORT_ORDER: <ERROR CLASS>(jvm) val DEFAULT_SORT_ORDER: Comparator<ZonedDateTime> |
TIMELINE_ORDER |
Compare by timeline order only, ignoring any offset or time zone differences. (iosArm64, iosX64, macosX64)val TIMELINE_ORDER: <ERROR CLASS>(jvm) val TIMELINE_ORDER: Comparator<TimePoint<*>> |
(iosArm64, iosX64, jvm, macosX64)
fromInstant |
Create a ZonedDateTime from the instant represented by a local date-time and offset. The resulting
fun fromInstant(dateTime: DateTime, offset: UtcOffset, zone: TimeZone): ZonedDateTime |
(iosArm64, iosX64, jvm, macosX64)
fromLocal |
Create a ZonedDateTime from a local date and time, optionally using a preferred offset. If the local date
and time fall during an overlap, preferredOffset will be used if it represents one of the two valid
offsets. If it is fun fromLocal(dateTime: DateTime, zone: TimeZone, preferredOffset: UtcOffset? = null): ZonedDateTime |
(iosArm64, iosX64, jvm, macosX64)
fromMillisecondsSinceUnixEpoch |
Create a ZonedDateTime from a number of milliseconds since the Unix epoch of 1970-01-01T00:00Z. fun fromMillisecondsSinceUnixEpoch(milliseconds: LongMilliseconds, zone: TimeZone): ZonedDateTime |
(iosArm64, iosX64, jvm, macosX64)
fromSecondsSinceUnixEpoch |
Create a ZonedDateTime from a number of seconds and additional nanoseconds since the Unix epoch of 1970-01-01T00:00Z. fun fromSecondsSinceUnixEpoch(seconds: LongSeconds, nanosecondAdjustment: IntNanoseconds, zone: TimeZone): ZonedDateTime |
(iosArm64, iosX64, jvm, macosX64)
fromUnixEpochMillisecond |
Create a ZonedDateTime from the millisecond of the Unix epoch. fun fromUnixEpochMillisecond(millisecond: Long, zone: TimeZone): ZonedDateTime |
(iosArm64, iosX64, jvm, macosX64)
fromUnixEpochSecond |
Create a ZonedDateTime from the second of the Unix epoch. fun fromUnixEpochSecond(second: Long, nanoOfSecond: Int, zone: TimeZone): ZonedDateTime |
(jvm)
toJavaZonedDateTime |
fun ZonedDateTime.toJavaZonedDateTime(): ZonedDateTime |