=begin pod :kind("Type") :subkind("class") :category("exception")

=TITLE class X::Temporal::InvalidFormat

=SUBTITLE Error due to using an invalid format when creating a DateTime or Date

=for code :skip-test<compile time error>
class X::Temporal::InvalidFormat does X::Temporal is Exception { }

This exception is thrown when code tries to create a C<DateTime> or C<Date> object
using an invalid format.

=begin code :ok-test<dd>
my $dt = Date.new("12/25/2015");
CATCH { default { put .^name, ': ', .Str } };
# OUTPUT: «X::Temporal::InvalidFormat: Invalid Date string '12/25/2015'; use yyyy-mm-dd instead␤»
=end code

=head1 Methods

=head2 method invalid-str

Returns the invalid format string (C<12/25/2015> in the example above)

=head2 method target

Returns the target type (C<Date> in the example above)

=head2 method format

Returns valid format strings for the target type in question, (C<yyyy-mm-dd> in the example above)

=end pod
