File tree Expand file tree Collapse file tree 2 files changed +2
-0
lines changed Expand file tree Collapse file tree 2 files changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ public actual class Instant internal constructor(internal val value: jtInstant)
73
73
if (epochMilliseconds > 0 ) MAX else MIN
74
74
}
75
75
76
+ // TODO: implement a custom parser to 1) help DCE get rid of the formatting machinery 2) move Instant to stdlib
76
77
public actual fun parse (input : CharSequence , format : DateTimeFormat <DateTimeComponents >): Instant = try {
77
78
// This format is not supported properly by Joda-Time, so we can't delegate to it.
78
79
format.parse(input).toInstantUsingOffset()
Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ public actual class Instant internal constructor(internal val value: jtInstant)
73
73
* optional minutes and seconds and `:` between them:
74
74
* https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatterBuilder.html#appendOffset-java.lang.String-java.lang.String-
75
75
*/
76
+ // TODO: implement a custom parser to 1) help DCE get rid of the formatting machinery 2) move Instant to stdlib
76
77
format.parse(input).toInstantUsingOffset()
77
78
} catch (e: IllegalArgumentException ) {
78
79
throw DateTimeFormatException (" Failed to parse an instant from '$input '" , e)
You can’t perform that action at this time.
0 commit comments