Skip to content

Commit

Permalink
Fix DateTime.fromString
Browse files Browse the repository at this point in the history
  • Loading branch information
hojberg committed Aug 15, 2023
1 parent d096783 commit 5c68231
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/UI/DateTime.elm
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ module UI.DateTime exposing
( DateTime
, DateTimeFormat(..)
, decode
, fromISO8601
, fromPosix
, fromString
, isSameDay
, toISO8601
, toPosix
Expand Down Expand Up @@ -55,10 +55,11 @@ decode =
Decode.map DateTime Iso8601.decoder


fromString : String -> Maybe DateTime
fromString s =
fromISO8601 : String -> Maybe DateTime
fromISO8601 s =
s
|> Decode.decodeString decode
|> Iso8601.toTime
|> Result.map DateTime
|> Result.toMaybe


Expand Down

0 comments on commit 5c68231

Please sign in to comment.