DateTimePlus::checkErrors

public function DateTimePlus::checkErrors

public DateTimePlus::checkErrors()

Examines getLastErrors() to see what errors to report.

Two kinds of errors are important: anything that DateTime considers an error, and also a warning that the date was invalid. PHP creates a valid date from invalid data with only a warning, 2011-02-30 becomes 2011-03-03, for instance, but we don't want that.

See also

http://php.net/manual/time.getlasterrors.php

File

core/lib/Drupal/Component/Datetime/DateTimePlus.php, line 441
登录查看完整内容