lib/jekyll/utils.rb
# Parse a date/time and throw an error if invalid
#
# input - the date/time to parse
# msg - (optional) the error message to show the user
#
# Returns the parsed date if successful, throws a FatalException
# if not
Parse a date/time and throw an error if invalid
input - the date/time to parse
msg - (optional) the error message to show the user

Returns the parsed date if successful, throws a FatalException
if not
Parse a date / time and throw an error if invalid input - the date / time to parse msg - ( optional ) the error message to show the user Returns the parsed date if successful throws a FatalException if not
def parse_date(input, msg = "Input could not be parsed.")
      Time.parse(input)
    rescue ArgumentError
      raise Errors::FatalException.new("Invalid date '#{input}': " + msg)
    end
def parse_date ( input , msg = "Input could not be parsed." ) Time . parse ( input ) rescue ArgumentError raise Errors :: FatalException . new ( "Invalid date '#{input}': " + msg ) end
Parse a date/time and throw an error if invalid
input - the date/time to parse
msg - (optional) the error message to show the user
Parse a date / time and throw an error if invalid input - the date / time to parse msg - ( optional ) the error message to show the user
input
msg