Permalink
Browse files

Revert dd test and okay yyyy-mm-dd examples

It was suggested that the yyyy-mm-dd exceptions be okayed and the
modifications testing for it be reverted. In this case, it is better to
manually ok the handful of exceptions than work the exceptions into the
test, making it more cluttered and obscuring the intent.
  • Loading branch information...
jstuder-gh committed Nov 22, 2017
1 parent 040ade6 commit b73921bba57f51ba02f7a3c78f4cddca0aaf9d74
Showing with 7 additions and 4 deletions.
  1. +2 −0 doc/Type/Dateish.pod6
  2. +5 −4 doc/Type/X/Temporal/InvalidFormat.pod6
View
@@ -186,8 +186,10 @@ Defined as:
Returns the date in C<YYYY-MM-DD> format (L<ISO 8601|https://en.wikipedia.org/wiki/ISO_8601>)
=begin code :ok-test<dd>
say Date.new("2015-11-15").yyyy-mm-dd; # OUTPUT: «2015-11-15␤»
say DateTime.new(1470853583).yyyy-mm-dd; # OUTPUT: «2016-08-10␤»
=end code
=head2 method daycount
@@ -10,10 +10,11 @@ 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.
=for code
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␤»
=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

0 comments on commit b73921b

Please sign in to comment.