Skip to content

Commit 0fba5c7

Browse files
committed
Restore Instant and Clock as type aliases to kotlin.time
1 parent b20c354 commit 0fba5c7

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

core/common/src/DeprecatedClock.kt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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+
@Deprecated(
9+
"This type is deprecated in favor of `kotlin.time.Clock`.",
10+
level = DeprecationLevel.WARNING,
11+
replaceWith = ReplaceWith("kotlin.time.Clock", "kotlin.time.Clock"))
12+
public typealias Clock = kotlin.time.Clock

core/common/src/DeprecatedInstant.kt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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+
@Deprecated(
9+
"This type is deprecated in favor of `kotlin.time.Instant`.",
10+
level = DeprecationLevel.WARNING,
11+
replaceWith = ReplaceWith("kotlin.time.Instant", "kotlin.time.Instant"))
12+
public typealias Instant = kotlin.time.Instant

0 commit comments

Comments
 (0)