Example #1
0
 protected function createFromGregorian($year, $month, $day)
 {
     $this->m_date = self::GREGORIAN_EPOCH - 1 + 365 * ($year - 1) + floor(($year - 1) / 4) + -floor(($year - 1) / 100) + floor(($year - 1) / 400) + floor((367 * $month - 362) / 12 + ($month <= 2 ? 0 : (SRFCHistoricalDate::leap_gregorian($year) ? -1 : -2)) + $day);
 }