Skip to content

Commit

Permalink
Document DateTime.later/.earlier .Intify units…
Browse files Browse the repository at this point in the history
…unless the unit is `second`/`seconds`. Intification was being
done for awhile in rakudo and was removed from `second` units
in rakudo/rakudo@656ff77b96
Propspec: Raku/roast@7c3bf500ed
  • Loading branch information
zoffixznet committed Apr 22, 2018
1 parent 2884b1e commit 2f27bfa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion doc/Type/DateTime.pod6
Expand Up @@ -268,6 +268,9 @@ Returns a DateTime object based on the current one, but with a time delta
applied. The time delta can be passed as a named argument where the argument
name is the unit.
Unless the given unit is C<second> or C<seconds>, the given value will be
converted to an L<Int>.
Allowed units are C<second>, C<seconds>, C<minute>, C<minutes>, C<hour>,
C<hours>, C<day>, C<days>, C<week>, C<weeks>, C<month>, C<months>, C<year>,
C<years>. Please note that the plural forms can only be used with
Expand Down Expand Up @@ -301,7 +304,8 @@ Defined as:
method earlier(DateTime:D: *%unit)
Returns a DateTime object based on the current one, but with a time delta
towards the past applied. See L<#method later> for usage.
towards the past applied. Unless the given unit is C<second> or C<seconds>,
the given value will be converted to an L<Int>. See L<#method later> for usage.
my $d = DateTime.new(date => Date.new('2015-02-27'));
say $d.earlier(month => 1).earlier(:2days); # OUTPUT: «2015-01-25T00:00:00Z␤»
Expand Down

0 comments on commit 2f27bfa

Please sign in to comment.