diff options
Diffstat (limited to 'stdlib/source/lux/time/date.lux')
-rw-r--r-- | stdlib/source/lux/time/date.lux | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/stdlib/source/lux/time/date.lux b/stdlib/source/lux/time/date.lux index 61c73835a..93fa324cb 100644 --- a/stdlib/source/lux/time/date.lux +++ b/stdlib/source/lux/time/date.lux @@ -228,8 +228,8 @@ (-> Date Text) ($_ text/compose (int/encode year) "-" - (pad (|> month month-to-nat n/inc nat-to-int)) "-" - (pad (|> day nat-to-int)))) + (pad (|> month month-to-nat inc .int)) "-" + (pad (|> day .int)))) (def: lex-year (l.Lexer Int) @@ -260,7 +260,7 @@ (def: leap-year-months (Sequence Nat) - (sequence.update [+1] n/inc normal-months)) + (sequence.update [+1] inc normal-months)) (def: (divisible? factor input) (-> Int Int Bool) @@ -286,13 +286,13 @@ leap-year-months normal-months) month-days (|> months - (sequence.nth (int-to-nat (i/dec utc-month))) + (sequence.nth (.nat (dec utc-month))) maybe.assume)] _ (l.this "-") utc-day lex-section _ (p.assert "Invalid day." (and (i/>= 1 utc-day) - (i/<= (nat-to-int month-days) utc-day)))] + (i/<= (.int month-days) utc-day)))] (wrap {#year utc-year #month (case utc-month 1 #January @@ -308,7 +308,7 @@ 11 #November 12 #December _ (undefined)) - #day (int-to-nat utc-day)}))) + #day (.nat utc-day)}))) (def: (decode input) (-> Text (e.Error Date)) |