use year of latest update on gallery page

This commit is contained in:
Rhiannon Morris 2020-09-21 21:44:54 +02:00
parent 0a7fad8afe
commit c04f34083f
2 changed files with 5 additions and 1 deletions

View file

@ -114,6 +114,10 @@ instance HasField "day" Info Int where getField = #third . #dmy
instance HasField "latestDate" Info Day where
getField (Info {date, updates}) = maximum (date : Map.keys updates)
instance HasField "latestYear" Info Integer where
getField = #first . toGregorian . #latestDate
instance HasField "updated" Info Bool where getField = not . Map.null . #updates
descFor :: Bool -> Info -> Maybe Text