File tree Expand file tree Collapse file tree 5 files changed +15
-0
lines changed Expand file tree Collapse file tree 5 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,9 @@ public actual class Instant internal constructor(internal val value: jtInstant)
8282 }
8383 }
8484
85+ @Deprecated(" This overload is only kept for binary compatibility" , level = DeprecationLevel .HIDDEN )
86+ public fun parse (isoString : String ): Instant = parse(input = isoString)
87+
8588 /* * A workaround for a quirk of the JDKs older than 11 where the string representations of Instant that have an
8689 * offset of the form "+XX" are not recognized by [jtOffsetDateTime.parse], while "+XX:XX" work fine. */
8790 private fun fixOffsetRepresentation (isoString : CharSequence ): CharSequence {
Original file line number Diff line number Diff line change @@ -30,6 +30,9 @@ public actual class LocalDate internal constructor(internal val value: jtLocalDa
3030 format.parse(input)
3131 }
3232
33+ @Deprecated(" This overload is only kept for binary compatibility" , level = DeprecationLevel .HIDDEN )
34+ public fun parse (isoString : String ): LocalDate = parse(input = isoString)
35+
3336 internal actual val MIN : LocalDate = LocalDate (jtLocalDate.MIN )
3437 internal actual val MAX : LocalDate = LocalDate (jtLocalDate.MAX )
3538
Original file line number Diff line number Diff line change @@ -68,6 +68,9 @@ public actual class LocalDateTime internal constructor(internal val value: jtLoc
6868 format.parse(input)
6969 }
7070
71+ @Deprecated(" This overload is only kept for binary compatibility" , level = DeprecationLevel .HIDDEN )
72+ public fun parse (isoString : String ): LocalDateTime = parse(input = isoString)
73+
7174 internal actual val MIN : LocalDateTime = LocalDateTime (jtLocalDateTime.MIN )
7275 internal actual val MAX : LocalDateTime = LocalDateTime (jtLocalDateTime.MAX )
7376
Original file line number Diff line number Diff line change @@ -56,6 +56,9 @@ public actual class LocalTime internal constructor(internal val value: jtLocalTi
5656 format.parse(input)
5757 }
5858
59+ @Deprecated(" This overload is only kept for binary compatibility" , level = DeprecationLevel .HIDDEN )
60+ public fun parse (isoString : String ): LocalTime = parse(input = isoString)
61+
5962 public actual fun fromSecondOfDay (secondOfDay : Int ): LocalTime = try {
6063 jtLocalTime.ofSecondOfDay(secondOfDay.toLong()).let (::LocalTime )
6164 } catch (e: DateTimeException ) {
Original file line number Diff line number Diff line change @@ -31,6 +31,9 @@ public actual class UtcOffset(internal val zoneOffset: ZoneOffset) {
3131 else -> format.parse(input)
3232 }
3333
34+ @Deprecated(" This overload is only kept for binary compatibility" , level = DeprecationLevel .HIDDEN )
35+ public fun parse (offsetString : String ): UtcOffset = parse(input = offsetString)
36+
3437 @Suppress(" FunctionName" )
3538 public actual fun Format (block : DateTimeFormatBuilder .WithUtcOffset .() -> Unit ): DateTimeFormat <UtcOffset > =
3639 UtcOffsetFormat .build(block)
You can’t perform that action at this time.
0 commit comments