update : 2015.11.03
php.shukuma.com검색:
|
IntlDateFormatter::setLenientdatefmt_set_lenient(PHP 5 >= 5.3.0, PECL intl >= 1.0.0) IntlDateFormatter::setLenient -- datefmt_set_lenient — Set the leniency of the parser 설명객체 기반 형식
public bool IntlDateFormatter::setLenient
( bool
$lenient
)절차식 형식 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. 인수
반환값
성공 시 예제Example #1 datefmt_set_lenient() example
<?php Example #2 OO example
<?php 위 예제의 출력: 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 참고
|