Merge branch 'master' of https://github.com/ndwebgroup/liquid into ndwebgroup-master

This commit is contained in:
Florian Weingarten
2013-06-18 04:13:49 +02:00
2 changed files with 12 additions and 1 deletions
+10 -1
View File
@@ -180,7 +180,16 @@ module Liquid
input = Time.at(input.to_i)
end
date = input.is_a?(String) ? Time.parse(input) : input
date = if input.is_a?(String)
case input.downcase
when 'now', 'today'
Time.now
else
Time.parse(input)
end
else
input
end
if date.respond_to?(:strftime)
date.strftime(format.to_s)