diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/time/date.lux | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/stdlib/source/lux/time/date.lux b/stdlib/source/lux/time/date.lux index aadd8199b..2963cdeba 100644 --- a/stdlib/source/lux/time/date.lux +++ b/stdlib/source/lux/time/date.lux @@ -13,12 +13,12 @@ ["<t>" text (#+ Parser)]]] [data ["." maybe] - ["." text ("#@." monoid)] + ["." text ("#\." monoid)] [number - ["n" nat ("#@." decimal)] + ["n" nat ("#\." decimal)] ["i" int]] [collection - ["." list ("#@." fold)] + ["." list ("#\." fold)] ["." dictionary (#+ Dictionary)]]] [type abstract]] @@ -28,7 +28,7 @@ (def: month-by-number (Dictionary Nat Month) - (list@fold (function (_ month mapping) + (list\fold (function (_ month mapping) (dictionary.put (//month.number month) month mapping)) (dictionary.new n.hash) //month.year)) @@ -50,17 +50,17 @@ (exception: #export (invalid-day {year Year} {month Month} {day Nat}) (exception.report - ["Value" (n@encode day)] - ["Minimum" (n@encode ..minimum-day)] - ["Maximum" (n@encode (..month-days year month))] + ["Value" (n\encode day)] + ["Minimum" (n\encode ..minimum-day)] + ["Maximum" (n\encode (..month-days year month))] ["Year" (:: //year.codec encode year)] - ["Month" (n@encode (//month.number month))])) + ["Month" (n\encode (//month.number month))])) (def: (pad value) (-> Nat Text) - (let [digits (n@encode value)] + (let [digits (n\encode value)] (if (n.< 10 value) - (text@compose "0" digits) + (text\compose "0" digits) digits))) (def: separator @@ -144,9 +144,9 @@ (template [<minimum> <maximum> <parser> <exception>] [(exception: #export (<exception> {value Nat}) (exception.report - ["Value" (n@encode value)] - ["Minimum" (n@encode <minimum>)] - ["Maximum" (n@encode <maximum>)])) + ["Value" (n\encode value)] + ["Minimum" (n\encode <minimum>)] + ["Maximum" (n\encode <maximum>)])) (def: <parser> (Parser Nat) @@ -173,7 +173,7 @@ (def: (encode value) (-> Date Text) - ($_ text@compose + ($_ text\compose (:: //year.codec encode (..year value)) ..separator (..pad (|> value ..month //month.number)) ..separator (..pad (..day-of-month value)))) |