File tree Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright 2019-2025 JetBrains s.r.o. and contributors.
3
+ * Use of this source code is governed by the Apache 2.0 License that can be found in the LICENSE.txt file.
4
+ */
5
+
6
+ package kotlinx.datetime
7
+
8
+ /* *
9
+ * This is a deprecated type alias for `kotlinx.datetime.Clock`.
10
+ *
11
+ * Before 0.7.0, this type was used to represent a clock in the `kotlinx.datetime` library.
12
+ * However, in Kotlin 2.1.20,
13
+ * the `kotlin.time.Clock` type was introduced and is now the preferred way to represent a clock.
14
+ *
15
+ * This type alias is kept for making sure the existing code that uses `kotlinx.datetime.Clock` compiles.
16
+ * For ensuring binary compatibility instead of source compatibility,
17
+ * see <https://github.com/Kotlin/kotlinx-datetime?tab=readme-ov-file#deprecation-of-instant>.
18
+ */
19
+ @Deprecated(
20
+ " This type is deprecated in favor of `kotlin.time.Clock`." ,
21
+ level = DeprecationLevel .WARNING ,
22
+ replaceWith = ReplaceWith (" kotlin.time.Clock" , " kotlin.time.Clock" ))
23
+ public typealias Clock = kotlin.time.Clock
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright 2019-2025 JetBrains s.r.o. and contributors.
3
+ * Use of this source code is governed by the Apache 2.0 License that can be found in the LICENSE.txt file.
4
+ */
5
+
6
+ package kotlinx.datetime
7
+
8
+ /* *
9
+ * This is a deprecated type alias for `kotlinx.datetime.Instant`.
10
+ *
11
+ * Before 0.7.0, this type was used to represent a clock in the `kotlinx.datetime` library.
12
+ * However, in Kotlin 2.1.20,
13
+ * the `kotlin.time.Instant` type was introduced and is now the preferred way to represent a moment in time.
14
+ *
15
+ * This type alias is kept for making sure the existing code that uses `kotlinx.datetime.Instant` compiles.
16
+ * For ensuring binary compatibility instead of source compatibility,
17
+ * see <https://github.com/Kotlin/kotlinx-datetime?tab=readme-ov-file#deprecation-of-instant>.
18
+ */
19
+ @Deprecated(
20
+ " This type is deprecated in favor of `kotlin.time.Instant`." ,
21
+ level = DeprecationLevel .WARNING ,
22
+ replaceWith = ReplaceWith (" kotlin.time.Instant" , " kotlin.time.Instant" ))
23
+ public typealias Instant = kotlin.time.Instant
You can’t perform that action at this time.
0 commit comments