use year of latest update on gallery page
This commit is contained in:
parent
0a7fad8afe
commit
c04f34083f
2 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue