/*** return value ***/ $ret = ""; if ($days_h) { /*** get the days and hours***/ $days = intval(intval($seconds) / (3600 * 24)); if ($days > 0) { $ret .= __('%s day(s)', array($days)) . ' '; } $hours = intval($seconds) / 3600 % 24; } else { /*** get the hours without days***/ $hours = intval(intval($seconds) / 3600); $days = 0; } if ($hours > 0) { $ret .= __('%s hour(s)', array($hours)) . ' '; } /*** get the minutes ***/ $minutes = intval($seconds) / 60 % 60; if ($minutes > 0) { $ret .= __('%s minutes', array($minutes)) . ' '; } if ($seconds_h) { $seconds = intval($seconds) % 60; $ret .= __('%s seconds', array($seconds)); } return $ret; } } Base_RegionalSettingsCommon::set_locale();