PHP » GoLang |
login |
register |
about
|
GoLang IntlDateFormatter::setLenient
request it (369)
GoLang replacement for PHP's IntlDateFormatter::setLenient
[edit | history]
PHP IntlDateFormatter::setLenientPHP original manual for IntlDateFormatter::setLenient [ show | php.net ]IntlDateFormatter::setLenientdatefmt_set_lenient(PHP 5 >= 5.3.0, PHP 7, PECL intl >= 1.0.0) IntlDateFormatter::setLenient -- datefmt_set_lenient — Set the leniency of the parser DescriptionObject oriented style
public bool IntlDateFormatter::setLenient
( bool
$lenient
)Procedural style 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. Parameters
Return Values
Returns ExamplesExample #1 datefmt_set_lenient() example
<?php Example #2 OO example
<?php The above example will output: lenient of the formatter is : TRUE Trying to do parse('35/13/1971'). Result is : 66038400 Now lenient of the formatter is : FALSE Trying to do parse('35/13/1971'). Result is : Error_msg is : Date parsing failed: U_PARSE_ERROR Error_code is : 9 See Also
|
more
Recently updated
more
Most requested
more
Last requests
|