/hphp/test/zend/good/ext/date/tests/date-lenient.php
PHP | 11 lines | 10 code | 1 blank | 0 comment | 0 complexity | 9b9ac37eda1cd472733661610e007316 MD5 | raw file
Possible License(s): LGPL-2.1, BSD-2-Clause, BSD-3-Clause, MPL-2.0-no-copyleft-exception, MIT, LGPL-2.0, Apache-2.0
- <?hh <<__EntryPoint>> function main(): void {
- $date = "06/08/04 12:00";
- print_r( date_parse_from_format( 'm/d/y', $date ) );
- print_r( date_parse_from_format( 'm/d/y+', $date ) );
- print_r( date_parse_from_format( '+m/d/y', $date ) );
- print_r( date_parse_from_format( 'm/d/y++', $date ) );
- $date = "06/08/04";
- print_r( date_parse_from_format( 'm/d/y+', $date ) );
- print_r( date_parse_from_format( '+m/d/y', $date ) );
- }