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.lux18
1 files changed, 9 insertions, 9 deletions
diff --git a/stdlib/source/lux/time/instant.lux b/stdlib/source/lux/time/instant.lux
index d6c506218..64d4fe172 100644
--- a/stdlib/source/lux/time/instant.lux
+++ b/stdlib/source/lux/time/instant.lux
@@ -102,7 +102,7 @@
(if (i/= +0 (duration.query year time-left))
[reference time-left]
(if (duration/>= duration.empty time-left)
- (recur (inc reference) (duration.merge (duration.scale -1 year) time-left))
+ (recur (inc reference) (duration.merge (duration.scale-up -1 year) time-left))
(recur (dec reference) (duration.merge year time-left)))
))))
@@ -121,14 +121,14 @@
(-> (Row Nat) duration.Duration [Nat duration.Duration])
(if (duration/>= duration.empty time)
(row/fold (function (_ month-days [current-month time-left])
- (let [month-duration (duration.scale (.int month-days) duration.day)]
+ (let [month-duration (duration.scale-up (.int month-days) duration.day)]
(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)])))
+ [(inc current-month) (duration.merge (duration.scale-up -1 month-duration) time-left)])))
[0 time]
months)
(row/fold (function (_ month-days [current-month time-left])
- (let [month-duration (duration.scale (.int month-days) duration.day)]
+ (let [month-duration (duration.scale-up (.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)])))
@@ -293,11 +293,11 @@
(i/+ (.int month-days-so-far))
(i/+ (dec utc-day)))]]
(wrap (|> epoch
- (shift (duration.scale total-days duration.day))
- (shift (duration.scale utc-hour duration.hour))
- (shift (duration.scale utc-minute duration.minute))
- (shift (duration.scale utc-second duration.second))
- (shift (duration.scale utc-millis duration.milli))))))
+ (shift (duration.scale-up total-days duration.day))
+ (shift (duration.scale-up utc-hour duration.hour))
+ (shift (duration.scale-up utc-minute duration.minute))
+ (shift (duration.scale-up utc-second duration.second))
+ (shift (duration.scale-up utc-millis duration.milli))))))
(def: (decode input)
(-> Text (e.Error Instant))