From f1ffff03ad6bf86c32c3af90393bd53ca21ad4db Mon Sep 17 00:00:00 2001 From: pacien Date: Mon, 6 Jan 2020 11:05:18 +0100 Subject: compiler: rename date field to more explicit datetime --- compiler/src/Resource.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'compiler/src/Resource.hs') diff --git a/compiler/src/Resource.hs b/compiler/src/Resource.hs index 53d61ac..29906b7 100644 --- a/compiler/src/Resource.hs +++ b/compiler/src/Resource.hs @@ -78,7 +78,7 @@ instance ToJSON GalleryItemProps where data GalleryItem = GalleryItem { title :: String - , date :: ZonedTime + , datetime :: ZonedTime , description :: String , tags :: [Tag] , path :: Path @@ -109,7 +109,7 @@ buildGalleryTree processItem processThumbnail tagsFromDirectories galleryName in fileModTime <- lastModTime path return GalleryItem { title = itemTitle - , date = fromMaybe fileModTime $ Input.date sidecar + , datetime = fromMaybe fileModTime $ Input.datetime sidecar , description = optMeta description "" , tags = (optMeta tags []) ++ implicitParentTags parents , path = parents Maybe ZonedTime mostRecentChildModTime = - maximumByMay comparingDates . map (date::(GalleryItem -> ZonedTime)) + maximumByMay comparingTime . map (datetime::(GalleryItem -> ZonedTime)) - comparingDates :: ZonedTime -> ZonedTime -> Ordering - comparingDates l r = compare (zonedTimeToUTC l) (zonedTimeToUTC r) + comparingTime :: ZonedTime -> ZonedTime -> Ordering + comparingTime l r = compare (zonedTimeToUTC l) (zonedTimeToUTC r) aggregateChildTags :: [GalleryItem] -> [Tag] aggregateChildTags = unique . concatMap (\item -> tags (item::GalleryItem)) -- cgit v1.2.3