Skip to content

Commit a625d4e

Browse files
authored
Merge pull request #245 from perl6/few-moments
Don't call 1 hour "a few moments"
2 parents 6b2a808 + 1a61e78 commit a625d4e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/Misc.pm6

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ sub time-left(Instant() $then, :$already-there?) is export {
5151
my $time-left = $then - now;
5252
return $already-there if $already-there and $time-left < 0;
5353
my ($seconds, $minutes, $hours, $days) = $time-left.polymod: 60, 60, 24;
54-
return is just a few moments away if not $days and not $hours;
54+
if not $days and not $hours {
55+
return is just a few moments away unless $minutes;
56+
return is in $minutes minute{s unless $minutes == 1};
57+
}
5558
my $answer = in ;
5659
$answer ~= $days day{$days1 ?? s !! } and if $days;
5760
$answer ~= $hours hour{$hours1 ?? s !! };

0 commit comments

Comments
 (0)