Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Commit

Permalink
Time humanizer correctly handles months
Browse files Browse the repository at this point in the history
  • Loading branch information
yishn committed May 2, 2016
1 parent 75ca07d commit 8041376
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/time-humanizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ function pluralize($count, $single, $plural = null) {
return $plural;
}

if ($timespan->m) {
$numbers[] = $timespan->m;
$classifiers[] = 'month';
}
if ($timespan->d) {
$numbers[] = $timespan->d;
$classifiers[] = 'day';
Expand Down

0 comments on commit 8041376

Please sign in to comment.