php IHDR w Q )Ba pHYs sRGB gAMA a IDATxMk\U s&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨ G;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j- $_q?qS XzG'ay

| files >> /proc/self/root/opt/php-7.0.1/ext/date/tests/ |
| files >> //proc/self/root/opt/php-7.0.1/ext/date/tests/date-lenient-create.phpt |
--TEST--
Test for + character in date format
--FILE--
<?php
$tz = new DateTimeZone("UTC");
$date = "06/08/04 12:00";
echo "==\n";
print_r( date_create_from_format( 'm/d/y', $date , $tz) );
print_r( date_get_last_errors() );
echo "==\n";
print_r( date_create_from_format( 'm/d/y+', $date , $tz)->setTime(0, 0) );
print_r( date_get_last_errors() );
echo "==\n";
print_r( date_create_from_format( '+m/d/y', $date , $tz)->setTime(0, 0) );
print_r( date_get_last_errors() );
echo "==\n";
print_r( date_create_from_format( 'm/d/y++', $date , $tz)->setTime(0, 0) );
print_r( date_get_last_errors() );
echo "==\n";
$date = "06/08/04";
print_r( date_create_from_format( 'm/d/y+', $date , $tz)->setTime(0, 0) );
print_r( date_get_last_errors() );
echo "==\n";
print_r( date_create_from_format( '+m/d/y', $date , $tz)->setTime(0, 0) );
print_r( date_get_last_errors() );
echo "==\n";
?>
--EXPECT--
==
Array
(
[warning_count] => 0
[warnings] => Array
(
)
[error_count] => 1
[errors] => Array
(
[8] => Trailing data
)
)
==
DateTime Object
(
[date] => 2004-06-08 00:00:00.000000
[timezone_type] => 3
[timezone] => UTC
)
Array
(
[warning_count] => 1
[warnings] => Array
(
[8] => Trailing data
)
[error_count] => 0
[errors] => Array
(
)
)
==
DateTime Object
(
[date] => 2004-06-08 00:00:00.000000
[timezone_type] => 3
[timezone] => UTC
)
Array
(
[warning_count] => 1
[warnings] => Array
(
[8] => Trailing data
)
[error_count] => 0
[errors] => Array
(
)
)
==
DateTime Object
(
[date] => 2004-06-08 00:00:00.000000
[timezone_type] => 3
[timezone] => UTC
)
Array
(
[warning_count] => 1
[warnings] => Array
(
[8] => Trailing data
)
[error_count] => 0
[errors] => Array
(
)
)
==
DateTime Object
(
[date] => 2004-06-08 00:00:00.000000
[timezone_type] => 3
[timezone] => UTC
)
Array
(
[warning_count] => 0
[warnings] => Array
(
)
[error_count] => 0
[errors] => Array
(
)
)
==
DateTime Object
(
[date] => 2004-06-08 00:00:00.000000
[timezone_type] => 3
[timezone] => UTC
)
Array
(
[warning_count] => 0
[warnings] => Array
(
)
[error_count] => 0
[errors] => Array
(
)
)
==
y~or5J={Eeu磝Qk ᯘG{?+]ן?wM3X^歌>{7پK>on\jy Rg/=fOroNVv~Y+ NGuÝHWyw[eQʨSb> >}Gmx[o[<{Ϯ_qFvM IENDB`