summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mulk/benki/book_marx.clj11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mulk/benki/book_marx.clj b/src/mulk/benki/book_marx.clj
index e1f0850..3fc7b32 100644
--- a/src/mulk/benki/book_marx.clj
+++ b/src/mulk/benki/book_marx.clj
@@ -16,7 +16,8 @@
[noir.response :as response]
[noir.session :as session]
hiccup.core)
- (:import [org.jsoup.Jsoup]))
+ (:import [org.jsoup Jsoup]
+ [java.text DateFormat]))
(def bookmark_tags (cq/table :bookmark_tags))
(def bookmarks (cq/table :bookmarks))
@@ -78,7 +79,11 @@
[:a {:href (escape-html (:uri mark))}
(escape-html (:title mark))]]
[:p {:class "bookmark-date-and-owner"}
- [:span {:class "bookmark-date"} (escape-html (:date mark))]
+ [:span {:class "bookmark-date"}
+ (escape-html
+ (.format
+ (DateFormat/getDateTimeInstance DateFormat/FULL DateFormat/FULL)
+ (:date mark)))]
[:span {:class "bookmark-owner"} " by " (escape-html (:first_name mark))]]
[:p {:class "bookmark-description"}
(htmlize-description (:description mark))]])]]))))
@@ -104,7 +109,7 @@
:when (or (.startsWith uri "http://")
(.startsWith uri "https://"))
soup (ignore-errors (slurp uri))
- page (org.jsoup.Jsoup/parse soup)
+ page (Jsoup/parse soup)
title (.select page "title")]
(.text title)))
origin (or origin