Check for `to_time`

This commit is contained in:
Pat Hawks 2016-12-22 19:18:43 -06:00
parent f7edcceb70
commit 72a56d9eb7
No known key found for this signature in database
GPG Key ID: F1746FF5F18B3D1B
1 changed files with 1 additions and 1 deletions

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