added word print for times < 1

This commit is contained in:
Sebastian Grewe 2013-05-14 23:58:24 +02:00
parent 1390c12a5d
commit 9762081d9d

View File

@ -9,6 +9,7 @@
function smarty_modifier_seconds_to_words($seconds) {
if ($seconds < 0) throw new Exception("Can't do negative numbers!");
if ($seconds == 0) return "zero seconds";
if ($seconds < 1) return "less than a second";
$hours = intval($seconds/pow(60,2));
$minutes = intval($seconds/60)%60;