From e2357aaa1b44806bb248b8f6c49979324689f7fd Mon Sep 17 00:00:00 2001 From: gered Date: Fri, 7 Jun 2013 19:07:51 -0400 Subject: [PATCH] fix parsing of date parts of post url to allow 2-digit days and months For more compatibility with the old Wordpress URLs --- src/blarg/routes/posts.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/blarg/routes/posts.clj b/src/blarg/routes/posts.clj index 12ca013..ffbeeb8 100644 --- a/src/blarg/routes/posts.clj +++ b/src/blarg/routes/posts.clj @@ -61,7 +61,7 @@ "posts/listarchive.html" {:months (posts/list-posts-archive (auth/logged-in?))})) (defn show-post-page [year month day slug] - (let [date (str year "-" month "-" day) + (let [date (str (string->int year) "-" (string->int month) "-" (string->int day)) post (posts/get-post-by-date-slug date slug)] (if (not-empty post) (layout/render