aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/time/instant.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/time/instant.lux20
1 files changed, 10 insertions, 10 deletions
diff --git a/stdlib/source/lux/time/instant.lux b/stdlib/source/lux/time/instant.lux
index ea834391e..427f4883e 100644
--- a/stdlib/source/lux/time/instant.lux
+++ b/stdlib/source/lux/time/instant.lux
@@ -108,14 +108,14 @@
(def: normal-months
(Row Nat)
- (row +31 +28 +31
- +30 +31 +30
- +31 +31 +30
- +31 +30 +31))
+ (row |31 |28 |31
+ |30 |31 |30
+ |31 |31 |30
+ |31 |30 |31))
(def: leap-year-months
(Row Nat)
- (row.update [+1] inc normal-months))
+ (row.update [|1] inc normal-months))
(def: (find-month months time)
(-> (Row Nat) duration.Duration [Nat duration.Duration])
@@ -125,14 +125,14 @@
(if (i/= 0 (duration.query month-duration time-left))
[current-month time-left]
[(inc current-month) (duration.merge (duration.scale -1 month-duration) time-left)])))
- [+0 time]
+ [|0 time]
months)
(row/fold (function (_ month-days [current-month time-left])
(let [month-duration (duration.scale (.int month-days) duration.day)]
(if (i/= 0 (duration.query month-duration time-left))
[current-month time-left]
[(dec current-month) (duration.merge month-duration time-left)])))
- [+11 time]
+ [|11 time]
(row.reverse months))))
(def: (pad value)
@@ -227,11 +227,11 @@
(def: lex-section
(l.Lexer Int)
- (p.codec number.Codec<Text,Int> (l.exactly +2 l.decimal)))
+ (p.codec number.Codec<Text,Int> (l.exactly |2 l.decimal)))
(def: lex-millis
(l.Lexer Int)
- (p.either (|> (l.at-most +3 l.decimal)
+ (p.either (|> (l.at-most |3 l.decimal)
(p.codec number.Codec<Text,Int>)
(p.after (l.this ".")))
(:: p.Monad<Parser> wrap 0)))
@@ -288,7 +288,7 @@
month-days-so-far (|> months
row.to-list
(list.take (.nat (dec utc-month)))
- (list/fold n/+ +0))
+ (list/fold n/+ |0))
total-days (|> year-days-so-far
(i/+ (.int month-days-so-far))
(i/+ (dec utc-day)))]]