Skip to content

Commit

Permalink
Suggested shortcut method similar to the Date methods in Datish.pm
Browse files Browse the repository at this point in the history
If yyyy-dd-mm is a thing, then this at least adds consistency. ;)
  • Loading branch information
Xliff committed Nov 7, 2016
1 parent 62005f1 commit bf51eca
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/DateTime.pm
Expand Up @@ -257,6 +257,8 @@ my class DateTime does Dateish {
method offset() { $!timezone }
method offset-in-minutes() { $!timezone / 60 }
method offset-in-hours() { $!timezone / 3600 }

method hh-mm-ss { sprintf "%02d:%02d:%02d", $!hour,$!minute,$!second; }

method later(:$earlier, *%unit) {
my @pairs = %unit.pairs;
Expand Down

0 comments on commit bf51eca

Please sign in to comment.