You are here

public function CalendarSystemsPoorMansJaliliCalendar::validate in Calendar Systems 8.3

Overrides CalendarSystemsPartialImplementation::validate

File

src/CalendarSystems/CalendarSystemsPoorMansJaliliCalendar.php, line 183
Fallback calendar implementation in case php-intl is not avaiable.

Class

CalendarSystemsPoorMansJaliliCalendar
Jalali calendar for calendar_systems.

Namespace

Drupal\calendar_systems\CalendarSystems

Code

public function validate(array $arr) {
  if ((!isset($arr['year']) || empty($arr['year'])) && (!isset($arr['month']) || empty($arr['month'])) && (!isset($arr['day']) || empty($arr['day']))) {
    return NULL;
  }
  return self::validate_($arr['year'], $arr['month'], $arr['day']);
}