Skip to content

Commit b73921b

Browse files
committed
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.
1 parent 040ade6 commit b73921b

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

doc/Type/Dateish.pod6

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,10 @@ Defined as:
186186
187187
Returns the date in C<YYYY-MM-DD> format (L<ISO 8601|https://en.wikipedia.org/wiki/ISO_8601>)
188188
189+
=begin code :ok-test<dd>
189190
say Date.new("2015-11-15").yyyy-mm-dd; # OUTPUT: «2015-11-15␤»
190191
say DateTime.new(1470853583).yyyy-mm-dd; # OUTPUT: «2016-08-10␤»
192+
=end code
191193
192194
=head2 method daycount
193195

doc/Type/X/Temporal/InvalidFormat.pod6

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ class X::Temporal::InvalidFormat does X::Temporal is Exception { }
1010
This exception is thrown when code tries to create a C<DateTime> or C<Date> object
1111
using an invalid format.
1212
13-
=for code
14-
my $dt = Date.new("12/25/2015");
15-
CATCH { default { put .^name, ': ', .Str } };
16-
# OUTPUT: «X::Temporal::InvalidFormat: Invalid Date string '12/25/2015'; use yyyy-mm-dd instead␤»
13+
=begin code :ok-test<dd>
14+
my $dt = Date.new("12/25/2015");
15+
CATCH { default { put .^name, ': ', .Str } };
16+
# OUTPUT: «X::Temporal::InvalidFormat: Invalid Date string '12/25/2015'; use yyyy-mm-dd instead␤»
17+
=end code
1718
1819
=head1 Methods
1920

0 commit comments

Comments
 (0)