Check for to_time

This commit is contained in:
Pat Hawks
2016-12-22 19:18:43 -06:00
parent f7edcceb70
commit 72a56d9eb7

View File

@@ -348,7 +348,7 @@ module Jekyll
private
def time(input)
date = Liquid::Utils.to_date(input)
unless date.respond_to?(:strftime)
unless date.respond_to?(:to_time)
raise Errors::InvalidDateError,
"Invalid Date: '#{input.inspect}' is not a valid datetime."
end