Symfony\Component\Intl\DateFormatter\IntlDateFormatter::setLenient
Set the leniency of the parser
Define if the parser is strict or lenient in interpreting inputs that do not match the pattern exactly. Enabling lenient parsing allows the parser to accept otherwise flawed date or time patterns, parsing as much as possible to obtain a value. Extra space, unrecognized tokens, or invalid values ("February 30th") are not accepted.
Signature
public function setLenient(Boolean
$lenient )
Parameters
$lenient
— object- Sets whether the parser is lenient or not. Currently
only false (strict) is supported.
Returns
- Boolean
- true on success or false on failure
Errors/Exceptions
-
MethodArgumentValueNotImplementedException
- When $lenient is true