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
adjustedTo
Link copied to clipboard
Changes the time zone of a ZonedDateTime, adjusting the date, time, and offset such that the instant represented by it remains the same.
copy
Link copied to clipboard
fun copy(dateTime: DateTime = this.dateTime, offset: UtcOffset = this.offset, zone: TimeZone = this.zone): ZonedDateTime
Content copied to clipboard
fun 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): ZonedDateTime
Content copied to clipboard
isSameInstantAs
Link copied to clipboard
minus
Link copied to clipboard
open operator override fun minus(microseconds: IntMicroseconds): ZonedDateTime
Content copied to clipboard
open operator override fun minus(milliseconds: IntMilliseconds): ZonedDateTime
Content copied to clipboard
open operator override fun minus(nanoseconds: IntNanoseconds): ZonedDateTime
Content copied to clipboard
open operator override fun minus(microseconds: LongMicroseconds): ZonedDateTime
Content copied to clipboard
open operator override fun minus(milliseconds: LongMilliseconds): ZonedDateTime
Content copied to clipboard
open operator override fun minus(nanoseconds: LongNanoseconds): ZonedDateTime
Content copied to clipboard
plus
Link copied to clipboard
open operator override fun plus(microseconds: IntMicroseconds): ZonedDateTime
Content copied to clipboard
open operator override fun plus(milliseconds: IntMilliseconds): ZonedDateTime
Content copied to clipboard
open operator override fun plus(nanoseconds: IntNanoseconds): ZonedDateTime
Content copied to clipboard
open operator override fun plus(microseconds: LongMicroseconds): ZonedDateTime
Content copied to clipboard
open operator override fun plus(milliseconds: LongMilliseconds): ZonedDateTime
Content copied to clipboard
open operator override fun plus(nanoseconds: LongNanoseconds): ZonedDateTime
Content copied to clipboard
rangeTo
Link copied to clipboard
withEarlierOffsetAtOverlap
Link copied to clipboard
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.
withFixedOffsetZone
Link copied to clipboard
withLaterOffsetAtOverlap
Link copied to clipboard
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
additionalNanosecondsSinceUnixEpoch
Link copied to clipboard
The number of additional nanoseconds on top of secondsSinceUnixEpoch.
dayOfMonth
Link copied to clipboard
millisecondOfUnixEpoch
Link copied to clipboard
millisecondsSinceUnixEpoch
Link copied to clipboard
monthNumber
Link copied to clipboard
nanosecond
Link copied to clipboard
secondOfUnixEpoch
Link copied to clipboard
secondsSinceUnixEpoch
Link copied to clipboard
Extensions
endOfMonth
Link copied to clipboard
endOfWeek
Link copied to clipboard
endOfYear
Link copied to clipboard
isInLeapDay
Link copied to clipboard
isInLeapYear
Link copied to clipboard
lengthOfMonth
Link copied to clipboard
lengthOfWeekBasedYear
Link copied to clipboard
lengthOfYear
Link copied to clipboard
next
Link copied to clipboard
nextOrSame
Link copied to clipboard
previous
Link copied to clipboard
previousOrSame
Link copied to clipboard
roundedDownTo
Link copied to clipboard
roundedDownToNearest
Link copied to clipboard
fun ZonedDateTime.roundedDownToNearest(increment: IntHours): ZonedDateTime
Content copied to clipboard
fun ZonedDateTime.roundedDownToNearest(increment: IntMinutes): ZonedDateTime
Content copied to clipboard
fun ZonedDateTime.roundedDownToNearest(increment: IntSeconds): ZonedDateTime
Content copied to clipboard
fun ZonedDateTime.roundedDownToNearest(increment: IntMilliseconds): ZonedDateTime
Content copied to clipboard
fun ZonedDateTime.roundedDownToNearest(increment: IntMicroseconds): ZonedDateTime
Content copied to clipboard
fun ZonedDateTime.roundedDownToNearest(increment: IntNanoseconds): ZonedDateTime
Content copied to clipboard
roundedTo
Link copied to clipboard
roundedToNearest
Link copied to clipboard
fun ZonedDateTime.roundedToNearest(increment: IntMilliseconds): ZonedDateTime
Content copied to clipboard
fun ZonedDateTime.roundedToNearest(increment: IntMicroseconds): ZonedDateTime
Content copied to clipboard
fun ZonedDateTime.roundedToNearest(increment: IntNanoseconds): ZonedDateTime
Content copied to clipboard
roundedUpTo
Link copied to clipboard
roundedUpToNearest
Link copied to clipboard
fun ZonedDateTime.roundedUpToNearest(increment: IntMinutes): ZonedDateTime
Content copied to clipboard
fun ZonedDateTime.roundedUpToNearest(increment: IntSeconds): ZonedDateTime
Content copied to clipboard
fun ZonedDateTime.roundedUpToNearest(increment: IntMilliseconds): ZonedDateTime
Content copied to clipboard
fun ZonedDateTime.roundedUpToNearest(increment: IntMicroseconds): ZonedDateTime
Content copied to clipboard
fun ZonedDateTime.roundedUpToNearest(increment: IntNanoseconds): ZonedDateTime
Content copied to clipboard
startOfMonth
Link copied to clipboard
startOfWeek
Link copied to clipboard
startOfYear
Link copied to clipboard
toJavaZonedDateTime
Link copied to clipboard
toNSDateComponents
Link copied to clipboard
fun ZonedDateTime.toNSDateComponents(includeCalendar: Boolean = false): <ERROR CLASS>
Content copied to clipboard
toOffsetDateTime
Link copied to clipboard
toOffsetTime
Link copied to clipboard
toYear
Link copied to clipboard
toYearMonth
Link copied to clipboard
truncatedTo
Link copied to clipboard
until
Link copied to clipboard
week
Link copied to clipboard
weekBasedYear
Link copied to clipboard
weekOfMonth
Link copied to clipboard
weekOfWeekBasedYear
Link copied to clipboard
weekOfYear
Link copied to clipboard