/** * @param $iDays * @param string $sDate * @return bool|string - new date */ static function subtractDays($iDays, $sDate = '') { if (!$sDate) { $sDate = date('Y-m-d'); } $julian = self::dateToJulian($sDate); $julian -= $iDays; return Date::julianToDate($julian); }
static function diff($endDate, $beginDate) { $start_date = Util\Date::dateToJulian($beginDate); $end_date = Util\Date::dateToJulian($endDate); return $end_date - $start_date; }