From 5b886e87046967999dbcf7f9509a60785e78266e Mon Sep 17 00:00:00 2001 From: Josh Dady Date: Thu, 25 Dec 2008 09:23:57 -0500 Subject: [PATCH 1/2] Added a strftime filter --- lib/jekyll/filters.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/jekyll/filters.rb b/lib/jekyll/filters.rb index 6051626a..f3cd8470 100644 --- a/lib/jekyll/filters.rb +++ b/lib/jekyll/filters.rb @@ -9,6 +9,10 @@ module Jekyll date.strftime("%d %B %Y") end + def strftime(date, format = '%x') + date.strftime(format) + end + def date_to_xmlschema(date) date.xmlschema end From 863b0dd990b8b01ce9dbb9b1c00c9b1a061cf877 Mon Sep 17 00:00:00 2001 From: Josh Dady Date: Thu, 25 Dec 2008 09:31:33 -0500 Subject: [PATCH 2/2] Okay, I didn't really need to create a new filter --- lib/jekyll/filters.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/jekyll/filters.rb b/lib/jekyll/filters.rb index f3cd8470..c05d8c67 100644 --- a/lib/jekyll/filters.rb +++ b/lib/jekyll/filters.rb @@ -1,18 +1,14 @@ module Jekyll module Filters - def date_to_string(date) - date.strftime("%d %b %Y") + def date_to_string(date, format="%d %b %Y") + date.strftime(format) end def date_to_long_string(date) date.strftime("%d %B %Y") end - def strftime(date, format = '%x') - date.strftime(format) - end - def date_to_xmlschema(date) date.xmlschema end