diff options
Diffstat (limited to 'ext/date/tests/date-parse-by-format001.phpt')
| -rw-r--r-- | ext/date/tests/date-parse-by-format001.phpt | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/ext/date/tests/date-parse-by-format001.phpt b/ext/date/tests/date-parse-by-format001.phpt new file mode 100644 index 0000000..66975e9 --- /dev/null +++ b/ext/date/tests/date-parse-by-format001.phpt @@ -0,0 +1,51 @@ +--TEST-- +Test for date_parse_by_format() +--FILE-- +<?php +$date = "06/08/04"; +print_r( date_parse_from_format( '!m/d/y', $date ) ); +print_r( date_parse_from_format( '!m*d*y', $date ) ); +?> +--EXPECT-- +Array +( + [year] => 2004 + [month] => 6 + [day] => 8 + [hour] => 0 + [minute] => 0 + [second] => 0 + [fraction] => 0 + [warning_count] => 0 + [warnings] => Array + ( + ) + + [error_count] => 0 + [errors] => Array + ( + ) + + [is_localtime] => +) +Array +( + [year] => 2004 + [month] => 6 + [day] => 8 + [hour] => 0 + [minute] => 0 + [second] => 0 + [fraction] => 0 + [warning_count] => 0 + [warnings] => Array + ( + ) + + [error_count] => 0 + [errors] => Array + ( + ) + + [is_localtime] => +) |
