diff options
author | Eduardo Julian | 2021-01-12 23:09:05 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-01-12 23:09:05 -0400 |
commit | 71de092a045dc70ab1c9eead477cf1512b144a87 (patch) | |
tree | 1f71aca655d867b748c430996d3687911b7537cc /stdlib/source/program/aedifex/artifact/time_stamp/date.lux | |
parent | 5dbf134346424602b0104d1f749c1a9eac6f21af (diff) |
Raise error when trying to use deprecated fields/method/classes in JVM.
Diffstat (limited to 'stdlib/source/program/aedifex/artifact/time_stamp/date.lux')
-rw-r--r-- | stdlib/source/program/aedifex/artifact/time_stamp/date.lux | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/stdlib/source/program/aedifex/artifact/time_stamp/date.lux b/stdlib/source/program/aedifex/artifact/time_stamp/date.lux deleted file mode 100644 index 18df2900b..000000000 --- a/stdlib/source/program/aedifex/artifact/time_stamp/date.lux +++ /dev/null @@ -1,39 +0,0 @@ -(.module: - [lux #* - [abstract - [monad (#+ do)]] - [control - ["<>" parser - ["<.>" text (#+ Parser)]]] - [data - [text - ["%" format]]] - [math - [number - ["n" nat]]] - [time - ["." date (#+ Date)] - ["." year] - ["." month]]]) - -(def: #export (pad value) - (-> Nat Text) - (if (n.< 10 value) - (%.format "0" (%.nat value)) - (%.nat value))) - -(def: #export (format value) - (%.Format Date) - (%.format (|> value date.year year.value .nat %.nat) - (|> value date.month month.number ..pad) - (|> value date.day_of_month ..pad))) - -(def: #export parser - (Parser Date) - (do <>.monad - [year (<>.codec n.decimal (<text>.exactly 4 <text>.decimal)) - year (<>.lift (year.year (.int year))) - month (<>.codec n.decimal (<text>.exactly 2 <text>.decimal)) - month (<>.lift (month.by_number month)) - day_of_month (<>.codec n.decimal (<text>.exactly 2 <text>.decimal))] - (<>.lift (date.date year month day_of_month)))) |