diff options
-rw-r--r-- | templates/show_recently_played.inc.php | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/templates/show_recently_played.inc.php b/templates/show_recently_played.inc.php index dc32d644..eff14df9 100644 --- a/templates/show_recently_played.inc.php +++ b/templates/show_recently_played.inc.php @@ -41,7 +41,21 @@ $time_unit = array('',_('seconds ago'),_('minutes ago'),_('hours ago'),_('days a while ($amount >= 1) { $final = $amount; $time_place++; - $amount = floor($amount/60); + if ($time_place <= 2) { + $amount = floor($amount/60); + } + if ($time_place == '3') { + $amount = floor($amount/24); + } + if ($time_place == '4') { + $amount = floor($amount/7); + } + if ($time_place == '5') { + $amount = floor($amount/4); + } + if ($time_place == '6') { + $amount = floor ($amount/12); + } } $time_string = $final . ' ' . $time_unit[$time_place]; |