Skip to content

Commit

Permalink
Add a TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
dkhalanskyjb committed May 13, 2024
1 parent 07c5a56 commit f9df45b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions core/commonJs/src/Instant.kt
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public actual class Instant internal constructor(internal val value: jtInstant)
if (epochMilliseconds > 0) MAX else MIN
}

// TODO: implement a custom parser to 1) help DCE get rid of the formatting machinery 2) move Instant to stdlib
public actual fun parse(input: CharSequence, format: DateTimeFormat<DateTimeComponents>): Instant = try {
// This format is not supported properly by Joda-Time, so we can't delegate to it.
format.parse(input).toInstantUsingOffset()
Expand Down
1 change: 1 addition & 0 deletions core/jvm/src/Instant.kt
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public actual class Instant internal constructor(internal val value: jtInstant)
public actual fun fromEpochMilliseconds(epochMilliseconds: Long): Instant =
Instant(jtInstant.ofEpochMilli(epochMilliseconds))

// TODO: implement a custom parser to 1) help DCE get rid of the formatting machinery 2) move Instant to stdlib
public actual fun parse(input: CharSequence, format: DateTimeFormat<DateTimeComponents>): Instant = try {
/**
* Can't use built-in Java Time's handling of `Instant.parse` because it supports 24:00:00 and
Expand Down

0 comments on commit f9df45b

Please sign in to comment.