aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/artifact/time/date.lux
diff options
context:
space:
mode:
authorEduardo Julian2021-08-08 17:56:15 -0400
committerEduardo Julian2021-08-08 17:56:15 -0400
commitf621a133e6e0a516c0586270fea8eaffb4829d82 (patch)
tree399396ee2f6a10df10cea9b78c51c76679b70e59 /stdlib/source/program/aedifex/artifact/time/date.lux
parent17e7566be51df5e428a6b10e6469201a8a9468da (diff)
No more #export magic syntax.
Diffstat (limited to 'stdlib/source/program/aedifex/artifact/time/date.lux')
-rw-r--r--stdlib/source/program/aedifex/artifact/time/date.lux20
1 files changed, 11 insertions, 9 deletions
diff --git a/stdlib/source/program/aedifex/artifact/time/date.lux b/stdlib/source/program/aedifex/artifact/time/date.lux
index b392a5569..6e84811e6 100644
--- a/stdlib/source/program/aedifex/artifact/time/date.lux
+++ b/stdlib/source/program/aedifex/artifact/time/date.lux
@@ -23,7 +23,7 @@
[type
abstract]]])
-(def: #export (pad value)
+(def: .public (pad value)
(-> Nat Text)
(if (n.< 10 value)
(%.format "0" (%.nat value))
@@ -32,20 +32,22 @@
(def: min_year +1,000)
(def: max_year +9,999)
-(exception: #export (year_is_out_of_range {year year.Year})
+(exception: .public (year_is_out_of_range {year year.Year})
(exception.report
["Minimum" (%.int ..min_year)]
["Maximum" (%.int ..max_year)]
["Year" (%.int (year.value year))]))
-(abstract: #export Date
+(abstract: .public Date
+ {}
+
date.Date
- (def: #export epoch
+ (def: .public epoch
Date
(:abstraction date.epoch))
- (def: #export (date raw)
+ (def: .public (date raw)
(-> date.Date (Try Date))
(let [year (|> raw date.year year.value)]
(if (and (i.>= ..min_year year)
@@ -53,24 +55,24 @@
(#try.Success (:abstraction raw))
(exception.except ..year_is_out_of_range [(date.year raw)]))))
- (def: #export value
+ (def: .public value
(-> Date date.Date)
(|>> :representation))
- (implementation: #export equivalence
+ (implementation: .public equivalence
(Equivalence Date)
(def: (= reference subject)
(date\= (:representation reference)
(:representation subject))))
- (def: #export (format value)
+ (def: .public (format value)
(%.Format Date)
(%.format (|> value :representation date.year year.value .nat %.nat)
(|> value :representation date.month month.number ..pad)
(|> value :representation date.day_of_month ..pad)))
- (def: #export parser
+ (def: .public parser
(Parser Date)
(do <>.monad
[year (<>.codec n.decimal (<text>.exactly 4 <text>.decimal))