diff options
author | Eduardo Julian | 2021-06-14 18:33:54 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-06-14 18:33:54 -0400 |
commit | 519c0c0c71cdf7ce3dfc64b9781ab826760b3d94 (patch) | |
tree | 75fa0672afceff129e5e75afb7a5fed197ce1773 /stdlib/source/program/aedifex/artifact | |
parent | af3e6e2cb011dc2ad9204440990731a2f272716d (diff) |
Extracted Licentia out of the standard library.
Diffstat (limited to 'stdlib/source/program/aedifex/artifact')
-rw-r--r-- | stdlib/source/program/aedifex/artifact/time.lux | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/stdlib/source/program/aedifex/artifact/time.lux b/stdlib/source/program/aedifex/artifact/time.lux index 59367c37d..b227c3954 100644 --- a/stdlib/source/program/aedifex/artifact/time.lux +++ b/stdlib/source/program/aedifex/artifact/time.lux @@ -5,12 +5,15 @@ [equivalence (#+ Equivalence)] [monad (#+ do)]] [control + ["." try (#+ Try)] ["<>" parser ["<.>" text (#+ Parser)]]] [data ["." product] [text - ["%" format (#+ Format)]]]] + ["%" format (#+ Format)]]] + [time + ["." instant (#+ Instant)]]] ["." / #_ ["#." date] ["#." time]]) @@ -22,6 +25,13 @@ Time [/date.epoch time.midnight]) +(def: #export (from_instant instant) + (-> Instant (Try Time)) + (do try.monad + [date (/date.date (instant.date instant))] + (wrap [date + (instant.time instant)]))) + (def: #export equivalence (Equivalence Time) (product.equivalence /date.equivalence |