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.
The date part of LocalDateTime.
A progression of values of type LocalDate.
A range of values of type LocalDate.
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.
The year-month part of LocalDate, without a day-of-month.
A progression of values of type YearMonth.
A range of values of type YearMonth.
Properties
Functions
Creates a Clock that uses the TimeMark.markNow to determine how far the current moment is from the origin.
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.
Returns an instant that corresponds to the start of this date in the specified timeZone.
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.
Creates a LocalDateProgression from this
down to that, inclusive.
Creates a YearMonthProgression from this
down to that, inclusive.
Returns the first LocalDate of the LocalDateProgression.
Returns the first YearMonth of the YearMonthProgression.
Returns the first LocalDate of the LocalDateProgression, or null if the progression is empty.
Returns the first YearMonth of the YearMonthProgression, or null if the progression is empty.
Formats this value using the given format. Equivalent to calling DateTimeFormat.format on format with this
.
Returns the last LocalDate of the LocalDateProgression.
Returns the last YearMonth of the YearMonthProgression.
Returns the last LocalDate of the LocalDateProgression, or null if the progression is empty.
Returns the last YearMonth of the YearMonthProgression, or null if the progression is empty.
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 a DateTimePeriod representing the difference between other and this
instants.
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 LocalDate that results from subtracting the value number of the specified unit from this date.
Returns a YearMonth that results from subtracting the value number of the specified unit from this year-month.
The YearMonth one month earlier.
Returns the number of whole months between two dates.
Returns the number of whole months between two year-months.
Returns the number of whole months between two instants in the specified timeZone.
A shortcut for calling DateTimeFormat.parse, followed by DateTimeComponents.toInstantUsingOffset.
Returns a DatePeriod representing the difference between this
and other dates.
Returns a DateTimePeriod representing the difference between this
and other instants.
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.
Returns a random LocalDate within the bounds of the LocalDateProgression.
Returns a random YearMonth within the bounds of the YearMonthProgression.
Returns a random LocalDate within the bounds of the LocalDateProgression or null if the progression is empty.
Returns a random YearMonth within the bounds of the YearMonthProgression or null if the progression is empty.
Returns a reversed LocalDateProgression, i.e. one that goes from last to first. The sign of the step is switched, in order to reverse the direction of the progression.
Returns a reversed YearMonthProgression, i.e. one that goes from last to first. The sign of the step is switched, in order to reverse the direction of the progression.
Returns a LocalDateProgression with the same start and end, but a changed step value.
Returns a YearMonthProgression with the same start and end, but a changed step value.
Constructs a DateTimePeriod from a Duration.
Creates a kotlinx.datetime.Clock delegating to the version of Clock
from the standard library.
Creates a kotlinx.datetime.Instant identical to the version of Instant
from the standard library.
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.DayOfWeek value to a java.time.DayOfWeek 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.Month value to a java.time.Month 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.DayOfWeek value to a kotlinx.datetime.DayOfWeek value.
Converts this java.time.ZoneOffset value to a kotlinx.datetime.FixedOffsetTimeZone 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 this java.time.Month value to a kotlinx.datetime.Month 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 this java.time.YearMonth value to a kotlinx.datetime.YearMonth value.
Converts the given LocalDate to NSDateComponents.
Converts the given LocalDateTime to NSDateComponents.
Converts the given YearMonth to NSDateComponents.
Converts the TimeZone to NSTimeZone.
Creates a kotlin.time.Clock (the standard library version of Clock
) delegating to this
.
Creates a kotlin.time.Instant (the standard library version of Instant
) identical to this
.
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 year-months.
Returns the number of whole years between two instants in the specified timeZone.