summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Alexander Foremny <aforemny@posteo.de>2025-02-20 18:27:42 +0100
committerLibravatar Alexander Foremny <aforemny@posteo.de>2025-02-20 18:27:42 +0100
commit69bd88efdabf9362d2218618a5b0786543961cb3 (patch)
tree1c389a5e6f9ab3ede93bcaca89b182800e8b4b43
parent0f27765b2786e390668a9c386b1b40fcb6f274fc (diff)
show times relatively
-rw-r--r--app/Main.hs7
-rw-r--r--feed-nomath-org.cabal1
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
<p .commit__message>#{message}
<div .commit__meta>
<span>by
- <span>#{author}
- <span>on
- <span>#{createdAt}
+ <span>#{author},
+ <span>
+ <span title=#{createdAt}>#{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,