Skip to content

Commit 94a2e0d

Browse files
committed
Add a TODO
1 parent 07c5a56 commit 94a2e0d

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

core/commonJs/src/Instant.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ public actual class Instant internal constructor(internal val value: jtInstant)
7373
if (epochMilliseconds > 0) MAX else MIN
7474
}
7575

76+
// TODO: implement a custom parser to 1) help DCE get rid of the formatting machinery 2) move Instant to stdlib
7677
public actual fun parse(input: CharSequence, format: DateTimeFormat<DateTimeComponents>): Instant = try {
7778
// This format is not supported properly by Joda-Time, so we can't delegate to it.
7879
format.parse(input).toInstantUsingOffset()

core/jvm/src/Instant.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ public actual class Instant internal constructor(internal val value: jtInstant)
7373
* optional minutes and seconds and `:` between them:
7474
* https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatterBuilder.html#appendOffset-java.lang.String-java.lang.String-
7575
*/
76+
// TODO: implement a custom parser to 1) help DCE get rid of the formatting machinery 2) move Instant to stdlib
7677
format.parse(input).toInstantUsingOffset()
7778
} catch (e: IllegalArgumentException) {
7879
throw DateTimeFormatException("Failed to parse an instant from '$input'", e)

0 commit comments

Comments
 (0)