Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion elm.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "rtfeldman/elm-iso8601-date-strings",
"summary": "Convert ISO8601 date strings to and from Posix times",
"license": "BSD-3-Clause",
"version": "1.1.3",
"version": "1.1.4",
"exposed-modules": [
"Iso8601"
],
Expand Down
2 changes: 1 addition & 1 deletion src/Iso8601.elm
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ epochYear =

yearMonthDay : ( Int, Int, Int ) -> Parser Int
yearMonthDay ( year, month, dayInMonth ) =
if dayInMonth < 0 then
if dayInMonth < 1 then
invalidDay dayInMonth

else
Expand Down
4 changes: 4 additions & 0 deletions tests/Example.elm
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ knownValues =
\_ ->
Iso8601.toTime "1970-01-01"
|> Expect.equal (Ok (Time.millisToPosix 0))
, test "Invalid day gives error" <|
\_ ->
Iso8601.toTime "2000-01-00"
|> Expect.err
, test "toTime supports microseconds precision" <|
\_ ->
Iso8601.toTime "2018-08-31T23:25:16.019345+02:00"
Expand Down