You are here

public static function DatexGregorian::isLeap in Datex 7.2

Will calculate whether the localized year is leap year or not.

Overrides DatexCalendarIterface::isLeap

File

datex_api/DatexGregorian.inc, line 47
Gregorian for datex. Nothinf special, always calls DateTime methods to handle stuff.

Class

DatexGregorian
Default Gregorian for datex.

Code

public static function isLeap($year) {
  $date = new DateTime();
  $date
    ->setDate($year, 1, 1);
  return $date
    ->format('L');
}