Skip to content
Permalink
Browse files

Make Date.truncate-to('day') a no-op

Fixes GH-2916
  • Loading branch information...
Tadeusz Sośnierz
Tadeusz Sośnierz committed May 23, 2019
1 parent e421e63 commit e943f3ebe5be4d046a42b0ea1958a221bead3354
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/core/Dateish.pm6
@@ -133,6 +133,9 @@ my role Dateish {
self!ymd-from-daycount($new-dc,
%parts<year>,%parts<month>,%parts<day>);
}
elsif $unit eq 'day' | 'days' {
# no-op
}
else { # $unit eq 'month' | 'months' | 'year' | 'years'
%parts<day> = 1;
%parts<month> = 1 if $unit eq 'year' | 'years';

0 comments on commit e943f3e

Please sign in to comment.
You can’t perform that action at this time.