Esempio n. 1
0
 /**
  * @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);
 }
Esempio n. 2
0
 static function diff($endDate, $beginDate)
 {
     $start_date = Util\Date::dateToJulian($beginDate);
     $end_date = Util\Date::dateToJulian($endDate);
     return $end_date - $start_date;
 }