aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/time.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/library/lux/time.lux24
1 files changed, 12 insertions, 12 deletions
diff --git a/stdlib/source/library/lux/time.lux b/stdlib/source/library/lux/time.lux
index c6206e167..051012a8d 100644
--- a/stdlib/source/library/lux/time.lux
+++ b/stdlib/source/library/lux/time.lux
@@ -45,8 +45,8 @@
(exception: .public (time_exceeds_a_day {time Nat})
(exception.report
- ["Time (in milli-seconds)" (n\encode time)]
- ["Maximum (in milli-seconds)" (n\encode (-- limit))]))
+ ["Time (in milli-seconds)" (n\encoded time)]
+ ["Maximum (in milli-seconds)" (n\encoded (-- limit))]))
(def: separator ":")
@@ -64,9 +64,9 @@
(template [<maximum> <parser> <exception> <sub_parser>]
[(exception: .public (<exception> {value Nat})
(exception.report
- ["Value" (n\encode value)]
- ["Minimum" (n\encode 0)]
- ["Maximum" (n\encode (-- <maximum>))]))
+ ["Value" (n\encoded value)]
+ ["Minimum" (n\encoded 0)]
+ ["Maximum" (n\encoded (-- <maximum>))]))
(def: <parser>
(Parser Nat)
@@ -156,8 +156,8 @@
(def: (padded value)
(-> Nat Text)
(if (n.< 10 value)
- (text\compose "0" (n\encode value))
- (n\encode value)))
+ (text\compose "0" (n\encoded value))
+ (n\encoded value)))
(def: (positive space duration)
(-> Duration Duration Duration)
@@ -168,10 +168,10 @@
(def: (millis_format millis)
(-> Nat Text)
(cond (n.= 0 millis) ""
- (n.< 10 millis) ($_ text\compose ".00" (n\encode millis))
- (n.< 100 millis) ($_ text\compose ".0" (n\encode millis))
+ (n.< 10 millis) ($_ text\compose ".00" (n\encoded millis))
+ (n.< 100 millis) ($_ text\compose ".0" (n\encoded millis))
... (n.< 1,000 millis)
- ($_ text\compose "." (n\encode millis))))
+ ($_ text\compose "." (n\encoded millis))))
(type: .public Clock
{#.doc (example "A clock marking the specific hour, minute, second, and milli-second in a day.")}
@@ -219,5 +219,5 @@
"For example: 21:14:51.827")}
(Codec Text Time)
- (def: encode ..format)
- (def: decode (<text>.result ..parser)))
+ (def: encoded ..format)
+ (def: decoded (<text>.result ..parser)))