|
@@ -15,7 +15,7 @@ discard block |
|
|
block discarded – undo |
|
15
|
15
|
} |
|
16
|
16
|
|
|
17
|
17
|
public static function formatTime(int $miliseconds): string { |
|
18
|
|
- $units = [ // Do not reorder the array order. |
|
|
18
|
+ $units = [// Do not reorder the array order. |
|
19
|
19
|
31536000000 => ['1 year', '@count years'], |
|
20
|
20
|
2592000000 => ['1 month', '@count months'], |
|
21
|
21
|
604800000 => ['1 week', '@count weeks'], |
|
@@ -30,7 +30,7 @@ discard block |
|
|
block discarded – undo |
|
30
|
30
|
$output = []; |
|
31
|
31
|
foreach ($units as $value => $string_pair) { |
|
32
|
32
|
if ($miliseconds >= $value) { |
|
33
|
|
- $output[] = static::formatPlural((int) floor($miliseconds / $value), $string_pair[0], $string_pair[1]); |
|
|
33
|
+ $output[] = static::formatPlural((int) floor($miliseconds / $value), $string_pair[0], $string_pair[1]); |
|
34
|
34
|
$miliseconds %= $value; |
|
35
|
35
|
$granularity--; |
|
36
|
36
|
} |
Please login to merge, or discard this patch.