Eno\Loaders ยป date
date() โ DateTime
dateItems() โ array
dateList() โ array
Accepts YYYY-MM-DD
and returns a PHP DateTime
object (or throws a ValidationError for invalid values).
enostart: 1992-12-01
end: 1994-03-04
invalid: 2018-03-14 13:10
php$document = Parser::parse($input);
$document->date('start'); // returns [DateTime]
$document->date('end'); // returns [DateTime]
$document->date('invalid');
// throws a ValidationError: 'invalid' must contain a valid date, for instance '1993-11-18'.