You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/topics/whatsnew/whatsnew2120.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -467,9 +467,9 @@ Starting with Kotlin 2.1.20, the standard library provides the ability to repres
467
467
was previously only available in [`kotlinx-datetime`](https://kotlinlang.org/api/kotlinx-datetime/), an official Kotlin
468
468
library.
469
469
470
-
The [`kotlinx.datetime.Clock`](https://kotlinlang.org/api/kotlinx-datetime/kotlinx-datetime/kotlinx.datetime/-clock/) interface
471
-
is introduced to the standard library as `kotlin.time.Clock` and the [`kotlinx.datetime.Instant`](https://kotlinlang.org/api/kotlinx-datetime/kotlinx-datetime/kotlinx.datetime/-instant/)
472
-
class as `kotlin.time.Instant`. These concepts naturally align with the `time` package in the standard library because
470
+
The `kotlinx.datetime.Clock` interface
471
+
is introduced to the standard library as [`kotlin.time.Clock`](https://kotlinlang.org/api/core/2.1/kotlin-stdlib/kotlin.time/-clock/) and the `kotlinx.datetime.Instant`
472
+
class as [`kotlin.time.Instant`](https://kotlinlang.org/api/core/2.1/kotlin-stdlib/kotlin.time/-instant/). These concepts naturally align with the `time` package in the standard library because
473
473
they're only concerned with moments in time compared to a more complex calendar and timezone functionality that remains
474
474
in `kotlinx-datetime`.
475
475
@@ -479,9 +479,9 @@ moment for system processes.
479
479
480
480
To provide interoperability with other languages, additional converter functions are available:
481
481
482
-
*`.toKotlinInstant()` converts a time value to a `kotlin.time.Instant` instance.
483
-
*`.toJavaInstant()` converts the `kotlin.time.Instant` value to a `java.time.Instant` value.
484
-
*`Instant.toJSDate()` converts the `kotlin.time.Instant` value to an instance of the JS `Date` class. This conversion
482
+
*[`.toKotlinInstant()`](https://kotlinlang.org/api/core/2.1/kotlin-stdlib/kotlin.time/to-kotlin-instant.html) converts a time value to a `kotlin.time.Instant` instance.
483
+
*[`.toJavaInstant()`](https://kotlinlang.org/api/core/2.1/kotlin-stdlib/kotlin.time/to-java-instant.html) converts the `kotlin.time.Instant` value to a `java.time.Instant` value.
484
+
*[`Instant.toJSDate()`](https://kotlinlang.org/api/core/2.1/kotlin-stdlib/kotlin.time/to-j-s-date.html) converts the `kotlin.time.Instant` value to an instance of the JS `Date` class. This conversion
485
485
is not precise; JS uses millisecond precision to represent dates, while Kotlin allows for nanosecond resolution.
486
486
487
487
The new time features of the standard library are still [Experimental](components-stability.md#stability-levels-explained).
0 commit comments