Skip to content

Commit

Permalink
Adds Locale "en" for groups in archives
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dl1ely committed Nov 19, 2014
1 parent 41e04c9 commit 9628fb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/leiningen/new/cryogen/src/cryogen/compiler.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9628fb9

Please sign in to comment.