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»
Methods§
method invalid-str§
Returns the invalid format string (12/25/2015
in the example above)
method target§
Returns the target type (Date
in the example above)
method format§
Returns valid format strings for the target type in question, (yyyy-mm-dd
in the example above)