Local Date Time
The representation of a specific civil date and time without a reference to a particular time zone.
This class does not describe specific moments in time, which are represented as Instant values. Instead, its instances can be thought of as clock readings, something that an observer in a particular time zone could witness. For example, 2020-08-30T18:43
is not a moment in time, since someone in Berlin and someone in Tokyo would witness this on their clocks at different times.
The main purpose of this class is to provide human-readable representations of Instant values, or to transfer them as data.
The arithmetic on LocalDateTime values is not provided, since without accounting for the time zone transitions it may give misleading results.
Constructors
Constructs a LocalDateTime instance from the given date and time components.
Constructs a LocalDateTime instance from the given date and time components.
Constructs a LocalDateTime instance by combining the given date and time parts.
Properties
Functions
Compares this
date/time value with the other date/time value. Returns zero if this value is equal to the other, a negative number if this value represents earlier civil time than the other, and a positive number if this value represents later civil time than the other.
Formats this value using the given format. Equivalent to calling DateTimeFormat.format on format with this
.
Returns an instant that corresponds to this civil date/time value in the specified timeZone.
Returns an instant that corresponds to this civil date/time value that happens at the specified UTC offset.
Converts this kotlinx.datetime.LocalDateTime value to a java.time.LocalDateTime value.
Converts the given LocalDate to NSDateComponents.