Merge branch 'PHP-8.3'

* PHP-8.3:
  Fix GH-12635: Test bug69398.phpt fails with ICU 74.1
This commit is contained in:
Niels Dossche 2023-11-11 17:04:48 +01:00
commit b3e10df1f7
2 changed files with 23 additions and 1 deletions

View file

@ -0,0 +1,19 @@
--TEST--
IntlDateFormatter::formatObject(): returns wrong value when time style is NONE.
--EXTENSIONS--
intl
--SKIPIF--
<?php
if (version_compare(INTL_ICU_VERSION, '74.1') < 0) die('skip for ICU < 74.1');
?>
--FILE--
<?php
$millitimestamp = 1428133423941.0; // 14:43:43 April 04 2015
$date = IntlCalendar::createInstance('Asia/Ho_Chi_Minh');
$date->setTime($millitimestamp);
echo IntlDateFormatter::formatObject($date, array(IntlDateFormatter::SHORT, IntlDateFormatter::NONE), 'vi_VN'), "\n";
echo IntlDateFormatter::formatObject ($date, array(IntlDateFormatter::SHORT, IntlDateFormatter::NONE), 'ko_KR'), "\n";
?>
--EXPECT--
4/4/15
15. 4. 4.

View file

@ -3,7 +3,10 @@ IntlDateFormatter::formatObject(): returns wrong value when time style is NONE.
--EXTENSIONS--
intl
--SKIPIF--
<?php if (version_compare(INTL_ICU_VERSION, '50.1.2') < 0) die('skip for ICU >= 51.1.2'); ?>
<?php
if (version_compare(INTL_ICU_VERSION, '50.1.2') < 0) die('skip for ICU < 51.1.2');
if (version_compare(INTL_ICU_VERSION, '74.1') >= 0) die('skip for ICU >= 74.1');
?>
--FILE--
<?php
$millitimestamp = 1428133423941.0; // 14:43:43 April 04 2015