You are here

public function DatexPoorMansJaliliCalendar::setDateLocale in Datex 8

Overrides DatexInterface::setDateLocale

1 call to DatexPoorMansJaliliCalendar::setDateLocale()
DatexPoorMansJaliliCalendar::parse in src/Datex/DatexPoorMansJaliliCalendar.php
Is supposed to parse a date string into date value.

File

src/Datex/DatexPoorMansJaliliCalendar.php, line 36
Fallback calendar implementation in case php-intl is not avaiable.

Class

DatexPoorMansJaliliCalendar
Jalali calendar for datex.

Namespace

Drupal\datex\Datex

Code

public function setDateLocale($y = 1, $m = 1, $d = 1) {
  list($y, $m, $d) = self::toGregorian($y, $m, $d);
  $this
    ->xSetDate($y, $m, $d);
  return $this;
}