Package-level declarations
Types
A special case of DateTimePeriod that only stores the date components and has all time components equal to zero.
Thrown by datetime arithmetic operations if the result cannot be computed or represented.
A difference between two instants, decomposed into date and time components.
A unit for measuring time; for example, a second, 20 seconds, a day, a month, or a quarter.
A time zone that is known to always have the same offset from UTC.
Thrown when attempting to construct a TimeZone with an invalid ID or unavailable rules.
A moment in time.
The date part of LocalDateTime.
The representation of a specific civil date and time without a reference to a particular time zone.
The time part of LocalDateTime.
A time zone, provides the conversion between Instant and LocalDateTime values using a collection of rules specifying which LocalDateTime value corresponds to each Instant.
An offset from UTC.
Properties
Returns true if the instant is Instant.DISTANT_FUTURE or later.
Returns true if the instant is Instant.DISTANT_PAST or earlier.
The ISO 8601 number of the given day of the week. Monday is 1, Sunday is 7.
Functions
Returns a TimeSource that uses this Clock to mark a time instant and to find the amount of time elapsed since that mark.
Returns the fixed-offset time zone with the given UTC offset.
Combines this time's components with the specified LocalDate components into a LocalDateTime value.
Combines this time's components with the specified date components into a LocalDateTime value.
Combines this date's components with the specified LocalTime components into a LocalDateTime value.
Combines this date's components with the specified time components into a LocalDateTime value.
Constructs a new DateTimePeriod. If all the time components are zero, returns a DatePeriod.
Returns the number of whole days between two dates.
Returns the number of whole days between two instants in the specified timeZone.
Formats this value using the given format. Equivalent to calling DateTimeFormat.format on format with this
.
Returns a date that results from subtracting components of DatePeriod from this date. The components are subtracted in the order from the largest units to the smallest: first years and months, then days.
Returns a DatePeriod representing the difference between other and this
dates.
Returns an instant that is the result of subtracting the value number of the specified unit from this instant.
Returns an instant that is the result of subtracting components of DateTimePeriod from this instant. The components are subtracted in the order from the largest units to the smallest, i.e., from years to nanoseconds.
Returns a DateTimePeriod representing the difference between other and this
instants.
Returns a LocalDate that results from subtracting the value number of the specified unit from this date.
Returns the number of whole months between two dates.
Returns the number of whole months between two instants in the specified timeZone.
Finds the offset from UTC this time zone has at the specified instant of physical time.
Returns a DatePeriod representing the difference between this
and other dates.
Returns a DateTimePeriod representing the difference between this
and other instants.
Adds two DatePeriod instances.
Adds two DateTimePeriod instances.
Returns a date that results from adding components of DatePeriod to this date. The components are added in the order from the largest units to the smallest: first years and months, then days.
Returns an instant that is the result of adding the value number of the specified unit to this instant.
Returns an instant that is the result of adding components of DateTimePeriod to this instant. The components are added in the order from the largest units to the smallest, i.e., from years to nanoseconds.
Constructs a DateTimePeriod from a Duration.
Returns an instant that corresponds to this civil datetime value in the specified timeZone.
Returns an instant that corresponds to this civil datetime value that happens at the specified UTC offset.
Converts this kotlinx.datetime.Instant value to a java.time.Instant value.
Converts this kotlinx.datetime.LocalDate value to a java.time.LocalDate value.
Converts this kotlinx.datetime.LocalDateTime value to a java.time.LocalDateTime value.
Converts this kotlinx.datetime.LocalDateTime value to a java.time.LocalTime value.
Converts this kotlinx.datetime.DatePeriod value to a java.time.Period value.
Converts this kotlinx.datetime.TimeZone value to a java.time.ZoneId value.
Converts this kotlinx.datetime.FixedOffsetTimeZone value to a java.time.ZoneOffset value.
Converts this kotlinx.datetime.UtcOffset value to a java.time.ZoneOffset value.
Converts this java.time.Period value to a kotlinx.datetime.DatePeriod value.
Converts this java.time.ZoneOffset value to a kotlinx.datetime.FixedOffsetTimeZone value.
Converts the NSDate to the corresponding Instant.
Converts this java.time.Instant value to a kotlinx.datetime.Instant value.
Converts this java.time.LocalDate value to a kotlinx.datetime.LocalDate value.
Converts this java.time.LocalDateTime value to a kotlinx.datetime.LocalDateTime value.
Converts this java.time.LocalTime value to a kotlinx.datetime.LocalTime value.
Converts the NSTimeZone to the corresponding TimeZone.
Converts this java.time.ZoneId value to a kotlinx.datetime.TimeZone value.
Converts this java.time.ZoneOffset value to a kotlinx.datetime.UtcOffset value.
Converts the given LocalDate to NSDateComponents.
Converts the TimeZone to NSTimeZone.
Constructs a UtcOffset from hours, minutes, and seconds components.
Returns the number of whole years between two dates.
Returns the number of whole years between two instants in the specified timeZone.