aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/time/date.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/time/date.lux')
-rw-r--r--stdlib/source/library/lux/time/date.lux90
1 files changed, 45 insertions, 45 deletions
diff --git a/stdlib/source/library/lux/time/date.lux b/stdlib/source/library/lux/time/date.lux
index 6fcd9a73b..e32440153 100644
--- a/stdlib/source/library/lux/time/date.lux
+++ b/stdlib/source/library/lux/time/date.lux
@@ -1,32 +1,32 @@
(.using
- [library
- [lux "*"
- [abstract
- [equivalence {"+" Equivalence}]
- [order {"+" Order}]
- [enum {"+" Enum}]
- [codec {"+" Codec}]
- [monad {"+" do}]]
- [control
- ["[0]" maybe]
- ["[0]" try {"+" Try}]
- ["[0]" exception {"+" exception:}]
- ["<>" parser
- ["<[0]>" text {"+" Parser}]]]
- [data
- ["[0]" text ("[1]#[0]" monoid)]
- [collection
- ["[0]" list ("[1]#[0]" mix)]
- ["[0]" dictionary {"+" Dictionary}]]]
- [math
- [number
- ["n" nat ("[1]#[0]" decimal)]
- ["i" int]]]
- [type
- abstract]]]
- ["[0]" // "_"
- ["[1][0]" year {"+" Year}]
- ["[1][0]" month {"+" Month}]])
+ [library
+ [lux "*"
+ [abstract
+ [equivalence {"+" Equivalence}]
+ [order {"+" Order}]
+ [enum {"+" Enum}]
+ [codec {"+" Codec}]
+ [monad {"+" do}]]
+ [control
+ ["[0]" maybe]
+ ["[0]" try {"+" Try}]
+ ["[0]" exception {"+" exception:}]
+ ["<>" parser
+ ["<[0]>" text {"+" Parser}]]]
+ [data
+ ["[0]" text ("[1]#[0]" monoid)]
+ [collection
+ ["[0]" list ("[1]#[0]" mix)]
+ ["[0]" dictionary {"+" Dictionary}]]]
+ [math
+ [number
+ ["n" nat ("[1]#[0]" decimal)]
+ ["i" int]]]
+ [type
+ abstract]]]
+ ["[0]" // "_"
+ ["[1][0]" year {"+" Year}]
+ ["[1][0]" month {"+" Month}]])
(def: month_by_number
(Dictionary Nat Month)
@@ -95,7 +95,7 @@
(template [<name> <type> <field>]
[(def: .public <name>
(-> Date <type>)
- (|>> :representation (value@ <field>)))]
+ (|>> :representation (the <field>)))]
[year Year #year]
[month Month #month]
@@ -109,13 +109,13 @@
(let [reference (:representation reference)
sample (:representation sample)]
(and (# //year.equivalence =
- (value@ #year reference)
- (value@ #year sample))
+ (the #year reference)
+ (the #year sample))
(# //month.equivalence =
- (value@ #month reference)
- (value@ #month sample))
- (n.= (value@ #day reference)
- (value@ #day sample))))))
+ (the #month reference)
+ (the #month sample))
+ (n.= (the #day reference)
+ (the #day sample))))))
(implementation: .public order
(Order Date)
@@ -126,19 +126,19 @@
(let [reference (:representation reference)
sample (:representation sample)]
(or (# //year.order <
- (value@ #year reference)
- (value@ #year sample))
+ (the #year reference)
+ (the #year sample))
(and (# //year.equivalence =
- (value@ #year reference)
- (value@ #year sample))
+ (the #year reference)
+ (the #year sample))
(or (# //month.order <
- (value@ #month reference)
- (value@ #month sample))
+ (the #month reference)
+ (the #month sample))
(and (# //month.order =
- (value@ #month reference)
- (value@ #month sample))
- (n.< (value@ #day reference)
- (value@ #day sample)))))))))
+ (the #month reference)
+ (the #month sample))
+ (n.< (the #day reference)
+ (the #day sample)))))))))
)
(def: section_parser