Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add fractional seconds to example
  • Loading branch information
jonathanstowe committed Jan 29, 2016
1 parent 72e466e commit 5b04e03
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion doc/Type/DateTime.pod
Expand Up @@ -341,7 +341,8 @@ Usage:
Returns a copy of the invocant, with everything smaller than the specified
unit truncated to the smallest possible value.
my $d = DateTime.new("2012-02-29T12:34:56Z");
my $d = DateTime.new("2012-02-29T12:34:56.946314Z");
say $d.truncated-to('second'); # 2012-02-29T12:34:56Z
say $d.truncated-to('minute'); # 2012-02-29T12:34:00Z
say $d.truncated-to('hour'); # 2012-02-29T12:00:00Z
say $d.truncated-to('day'); # 2012-02-29T00:00:00Z
Expand Down

0 comments on commit 5b04e03

Please sign in to comment.