public function DatexPoorMansGregorianCalendar::parse in Datex 7.3
Overrides DatexInterface::parse
File
- src/
Datex/ DatexPoorMansGregorianCalendar.php, line 50 - Fallback calendar implementation in case php-intl is not available.
Class
- DatexPoorMansGregorianCalendar
- @file Fallback calendar implementation in case php-intl is not available.
Code
public function parse($value, $format) {
$dt = DateTime::createFromFormat($format, $value);
if (!$dt) {
return FALSE;
}
$this
->setTimestamp($dt
->getTimestamp());
return TRUE;
}