Error due to using an invalid format when creating a DateTime or Date
does X::Temporal is Exception
This exception is thrown when code tries to create a DateTime
or Date
object using an invalid format.
my = Date.new("12/25/2015");CATCH ;# OUTPUT: «X::Temporal::InvalidFormat: Invalid Date string '12/25/2015'; use yyyy-mm-dd instead»
Returns the invalid format string (12/25/2015
in the example above)
Returns the target type (Date
in the example above)
Returns valid format strings for the target type in question, (yyyy-mm-dd
in the example above)