aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/world/time/year.lux
diff options
context:
space:
mode:
authorEduardo Julian2022-08-11 04:15:07 -0400
committerEduardo Julian2022-08-11 04:15:07 -0400
commit065e8a4d8122d4616b570496915d2c0e2c78cd6b (patch)
treef2bbdc3e40b796b34026ab04c9a478d8a3f082d5 /stdlib/source/library/lux/world/time/year.lux
parent68d78235694c633c956bb9e8a007cad7d65370bc (diff)
Re-named the "case" macro to "when".
Diffstat (limited to '')
-rw-r--r--stdlib/source/library/lux/world/time/year.lux4
1 files changed, 2 insertions, 2 deletions
diff --git a/stdlib/source/library/lux/world/time/year.lux b/stdlib/source/library/lux/world/time/year.lux
index a7bdb0dcf..ae01271f5 100644
--- a/stdlib/source/library/lux/world/time/year.lux
+++ b/stdlib/source/library/lux/world/time/year.lux
@@ -41,7 +41,7 @@
(def .public (year value)
(-> Int (Try Year))
- (case value
+ (when value
+0 (exception.except ..there_is_no_year_0 [])
_ {try.#Success (abstraction (..internal value))}))
@@ -118,7 +118,7 @@
[sign (<>.or (<text>.this "-") (in []))
digits (<text>.many <text>.decimal)
raw_year (<>.codec i.decimal (in (text#composite "+" digits)))]
- (<>.lifted (..year (case sign
+ (<>.lifted (..year (when sign
{.#Left _} (i.* -1 raw_year)
{.#Right _} raw_year)))))