From 09946386b171d3594604c0c6f319ed27e3d07563 Mon Sep 17 00:00:00 2001 From: Nick Quaranto Date: Tue, 23 Jun 2009 18:22:27 -0400 Subject: [PATCH] Adding Date#xmlschema from ActiveSupport for Ruby < 1.9. Closes #47 --- lib/jekyll/core_ext.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/jekyll/core_ext.rb b/lib/jekyll/core_ext.rb index 18159fbf..ead448a4 100644 --- a/lib/jekyll/core_ext.rb +++ b/lib/jekyll/core_ext.rb @@ -19,4 +19,12 @@ class Hash target end -end \ No newline at end of file +end + +# Thanks, ActiveSupport! +class Date + # Converts datetime to an appropriate format for use in XML + def xmlschema + strftime("%Y-%m-%dT%H:%M:%S%Z") + end if RUBY_VERSION < '1.9' +end