aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program
diff options
context:
space:
mode:
authorEduardo Julian2021-01-12 23:09:05 -0400
committerEduardo Julian2021-01-12 23:09:05 -0400
commit71de092a045dc70ab1c9eead477cf1512b144a87 (patch)
tree1f71aca655d867b748c430996d3687911b7537cc /stdlib/source/program
parent5dbf134346424602b0104d1f749c1a9eac6f21af (diff)
Raise error when trying to use deprecated fields/method/classes in JVM.
Diffstat (limited to 'stdlib/source/program')
-rw-r--r--stdlib/source/program/aedifex/artifact/time.lux35
-rw-r--r--stdlib/source/program/aedifex/artifact/time/date.lux (renamed from stdlib/source/program/aedifex/artifact/time_stamp/date.lux)0
-rw-r--r--stdlib/source/program/aedifex/artifact/time/time.lux (renamed from stdlib/source/program/aedifex/artifact/time_stamp/time.lux)0
3 files changed, 35 insertions, 0 deletions
diff --git a/stdlib/source/program/aedifex/artifact/time.lux b/stdlib/source/program/aedifex/artifact/time.lux
new file mode 100644
index 000000000..19eb417a5
--- /dev/null
+++ b/stdlib/source/program/aedifex/artifact/time.lux
@@ -0,0 +1,35 @@
+(.module:
+ [lux #*
+ [abstract
+ [equivalence (#+ Equivalence)]
+ [monad (#+ do)]]
+ [control
+ ["<>" parser
+ ["<.>" text (#+ Parser)]]]
+ [data
+ [text
+ ["%" format (#+ Format)]]]
+ [time
+ ["." instant (#+ Instant)]]]
+ ["." / #_
+ ["#." date]
+ ["#." time]])
+
+(type: #export Time
+ Instant)
+
+(def: #export equivalence
+ (Equivalence Time)
+ instant.equivalence)
+
+(def: #export (format value)
+ (Format Time)
+ (%.format (/date.format (instant.date value))
+ (/time.format (instant.time value))))
+
+(def: #export parser
+ (Parser Time)
+ (do <>.monad
+ [date /date.parser
+ time /time.parser]
+ (wrap (instant.from_date_time date time))))
diff --git a/stdlib/source/program/aedifex/artifact/time_stamp/date.lux b/stdlib/source/program/aedifex/artifact/time/date.lux
index 18df2900b..18df2900b 100644
--- a/stdlib/source/program/aedifex/artifact/time_stamp/date.lux
+++ b/stdlib/source/program/aedifex/artifact/time/date.lux
diff --git a/stdlib/source/program/aedifex/artifact/time_stamp/time.lux b/stdlib/source/program/aedifex/artifact/time/time.lux
index d14f0a435..d14f0a435 100644
--- a/stdlib/source/program/aedifex/artifact/time_stamp/time.lux
+++ b/stdlib/source/program/aedifex/artifact/time/time.lux