From 69bd88efdabf9362d2218618a5b0786543961cb3 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Thu, 20 Feb 2025 18:27:42 +0100 Subject: show times relatively --- app/Main.hs | 7 ++++--- feed-nomath-org.cabal | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/Main.hs b/app/Main.hs index d19a08b..a31a84b 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -39,6 +39,7 @@ import Text.Blaze.Html.Renderer.Utf8 import Text.Cassius import Text.Hamlet import Text.Printf +import Text.Time.Pretty (prettyTimeAutoFromNow) import Text.XML.Stream.Render env_REPOSITORIES :: [String] @@ -209,9 +210,9 @@ instance ToMarkup Commit where

#{message}

by - #{author} - on - #{createdAt} + #{author}, + + #{unsafePerformIO (prettyTimeAutoFromNow createdAt)} |] instance ToMarkup Day where diff --git a/feed-nomath-org.cabal b/feed-nomath-org.cabal index 9438be2..86db8ec 100644 --- a/feed-nomath-org.cabal +++ b/feed-nomath-org.cabal @@ -24,6 +24,7 @@ executable feed-nomath-org gitlib, gitlib-libgit2, http-types, + pretty-relative-time, shakespeare, split, tagged, -- cgit v1.2.3