Skip to content

Commit

Permalink
Replace samewith for performance reasons
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanstowe committed Sep 26, 2016
1 parent fd443eb commit 6b1df57
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Chronic.pm
Original file line number Diff line number Diff line change
Expand Up @@ -393,13 +393,13 @@ class Chronic:ver<0.0.4>:auth<github:jonathanstowe> {
}

multi method at(Int $i) returns Promise {
samewith(DateTime.new($i));
self.at(DateTime.new($i));
}
multi method at(Instant:D $i) returns Promise {
samewith(DateTime.new($i));
self.at(DateTime.new($i));
}
multi method at(Str:D $d) returns Promise {
samewith(DateTime.new($d));
self.at(DateTime.new($d));
}
multi method at(DateTime $d) returns Promise {
my $datetime = $d.truncated-to('second');
Expand Down

0 comments on commit 6b1df57

Please sign in to comment.