fix latest date calculation
This commit is contained in:
parent
8e5d30d372
commit
5944a55020
1 changed files with 1 additions and 1 deletions
|
@ -199,7 +199,7 @@ thumb (Info {thumb', images}) =
|
||||||
latestDateFor :: Bool -> Info -> Date
|
latestDateFor :: Bool -> Info -> Date
|
||||||
latestDateFor nsfw i = maximum $ i.date : mapMaybe relDate (updatesFor nsfw i)
|
latestDateFor nsfw i = maximum $ i.date : mapMaybe relDate (updatesFor nsfw i)
|
||||||
where
|
where
|
||||||
relDate (date, us) = date <$ guard (not $ null us || any (.ignoreSort) us)
|
relDate (date, us) = date <$ guard (not $ null us || all (.ignoreSort) us)
|
||||||
|
|
||||||
latestYearFor :: Bool -> Info -> Int
|
latestYearFor :: Bool -> Info -> Int
|
||||||
latestYearFor nsfw info = (latestDateFor nsfw info).year
|
latestYearFor nsfw info = (latestDateFor nsfw info).year
|
||||||
|
|
Loading…
Reference in a new issue