/** * Function converts given int to time string assuming that hours can be more than 24. * * @category OSS * @package OSS_Smarty * @subpackage Functions * * @param int $timestamp * @return string */ function smarty_function_secondsToHMS($params, &$smarty) { $time = OSS_DateTime::secondsToHMS($params["seconds"]); $str = $time["hours"]; $str .= ":" . ($time["minutes"] > 9 ? $time["minutes"] : "0" . $time["minutes"]); $str .= ":" . ($time["seconds"] > 9 ? $time["seconds"] : "0" . $time["seconds"]); return $str; }
/** * Returns with the number of days the invoice is overdue. * * @return int */ public function overdueDays() { return OSS_DateTime::dateDiffDays($this->getDueDate()->format("Y-m-d"), null, false); }