From 3bfe0bdcb79b398a387e202c5150b5e6fd230d3a Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 16 Mar 2017 01:19:07 +0100 Subject: More complicated date handling --- templates/inventoryListing.hamlet | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) (limited to 'templates/inventoryListing.hamlet') diff --git a/templates/inventoryListing.hamlet b/templates/inventoryListing.hamlet index 3be43db..39758bb 100644 --- a/templates/inventoryListing.hamlet +++ b/templates/inventoryListing.hamlet @@ -26,22 +26,27 @@
#{itemKind}
#{itemType}
- $maybe bought <- itemBought - #{dayFormat bought} - $nothing -
+ $case itemBought + $of DateUnknown +
+ $of DateKnown d + #{dayFormat d}
- $maybe expires <- itemExpires - #{dayFormat expires} - $nothing -
+ $case itemExpires + $of DateNever +
+ $of DateKnown d + #{dayFormat d}
- $maybe opened <- itemOpened - #{dayFormat opened} - $nothing -
-