From af3e6e2cb011dc2ad9204440990731a2f272716d Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 12 Jun 2021 01:32:40 -0400 Subject: Constraining the year of the snapshot time in Aedifex. --- stdlib/source/program/aedifex/artifact/versioning.lux | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'stdlib/source/program/aedifex/artifact/versioning.lux') diff --git a/stdlib/source/program/aedifex/artifact/versioning.lux b/stdlib/source/program/aedifex/artifact/versioning.lux index dab943145..a16d92796 100644 --- a/stdlib/source/program/aedifex/artifact/versioning.lux +++ b/stdlib/source/program/aedifex/artifact/versioning.lux @@ -21,7 +21,6 @@ [number ["n" nat]]] ["." time (#+ Time) - ["." instant (#+ Instant)] ["." date (#+ Date)] ["." year] ["." month]]] @@ -32,19 +31,19 @@ (type: #export Versioning {#snapshot Snapshot - #last_updated Instant + #last_updated //time.Time #versions (List Version)}) (def: #export init {#snapshot #//snapshot.Local - #last_updated instant.epoch + #last_updated //time.epoch #versions (list)}) (def: #export equivalence (Equivalence Versioning) ($_ product.equivalence //snapshot.equivalence - instant.equivalence + //time.equivalence (list.equivalence //snapshot/version.equivalence) )) @@ -58,7 +57,7 @@ ) (def: format_last_updated - (-> Instant XML) + (-> //time.Time XML) (|>> //time.format #xml.Text list (#xml.Node .. xml.attributes))) (def: #export (format (^slots [#snapshot #last_updated #versions])) @@ -81,7 +80,7 @@ (..sub tag .text)) (def: last_updated_parser - (Parser Instant) + (Parser //time.Time) (.embed //time.parser (..text ..))) @@ -90,7 +89,7 @@ (<| (..sub ..) ($_ <>.and (<>.default #//snapshot.Local (.somewhere //snapshot.parser)) - (<>.default instant.epoch (.somewhere ..last_updated_parser)) + (<>.default //time.epoch (.somewhere ..last_updated_parser)) (<| (<>.default (list)) .somewhere (..sub ..) -- cgit v1.2.3