From 9628fb90ae25b027f82a761d762cc17496275dc6 Mon Sep 17 00:00:00 2001 From: "Stefan Pfeiffer, DL1ELY" Date: Wed, 19 Nov 2014 14:09:10 +0100 Subject: [PATCH] Adds Locale "en" for groups in archives MMMM in the SimpleDateFormat constructor is replaced with the month name of the default locale. The date:longDate filter of Selmer in Archives.html generates a format with english month names. On non-english Systems that leads to months names in the local language for the group names, but english month names for the full dates on the post. To be consistent, the locale "en" gets set manually on the SimpleDateFormatter constructor call. This results in english month names on the archives page. --- src/leiningen/new/cryogen/src/cryogen/compiler.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/leiningen/new/cryogen/src/cryogen/compiler.clj b/src/leiningen/new/cryogen/src/cryogen/compiler.clj index a079b12..80c8851 100755 --- a/src/leiningen/new/cryogen/src/cryogen/compiler.clj +++ b/src/leiningen/new/cryogen/src/cryogen/compiler.clj @@ -65,7 +65,7 @@ :toc (if (:toc page-meta) (generate-toc content))} (if is-post? {:date (parse-post-date file-name) - :archive-group (.format (java.text.SimpleDateFormat. "yyyy MMMM") (parse-post-date file-name)) + :archive-group (.format (java.text.SimpleDateFormat. "yyyy MMMM" (java.util.Locale "en")) (parse-post-date file-name)) :uri (post-uri file-name config) :tags (set (:tags page-meta))} {:uri (page-uri file-name config)