Skip to content

Commit b3e10df

Browse files
committed
Merge branch 'PHP-8.3'
* PHP-8.3: Fix GH-12635: Test bug69398.phpt fails with ICU 74.1
2 parents 8f424dd + 608842b commit b3e10df

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

ext/intl/tests/bug69398-icu74.1.phpt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
--TEST--
2+
IntlDateFormatter::formatObject(): returns wrong value when time style is NONE.
3+
--EXTENSIONS--
4+
intl
5+
--SKIPIF--
6+
<?php
7+
if (version_compare(INTL_ICU_VERSION, '74.1') < 0) die('skip for ICU < 74.1');
8+
?>
9+
--FILE--
10+
<?php
11+
$millitimestamp = 1428133423941.0; // 14:43:43 April 04 2015
12+
$date = IntlCalendar::createInstance('Asia/Ho_Chi_Minh');
13+
$date->setTime($millitimestamp);
14+
echo IntlDateFormatter::formatObject($date, array(IntlDateFormatter::SHORT, IntlDateFormatter::NONE), 'vi_VN'), "\n";
15+
echo IntlDateFormatter::formatObject ($date, array(IntlDateFormatter::SHORT, IntlDateFormatter::NONE), 'ko_KR'), "\n";
16+
?>
17+
--EXPECT--
18+
4/4/15
19+
15. 4. 4.

ext/intl/tests/bug69398.phpt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ IntlDateFormatter::formatObject(): returns wrong value when time style is NONE.
33
--EXTENSIONS--
44
intl
55
--SKIPIF--
6-
<?php if (version_compare(INTL_ICU_VERSION, '50.1.2') < 0) die('skip for ICU >= 51.1.2'); ?>
6+
<?php
7+
if (version_compare(INTL_ICU_VERSION, '50.1.2') < 0) die('skip for ICU < 51.1.2');
8+
if (version_compare(INTL_ICU_VERSION, '74.1') >= 0) die('skip for ICU >= 74.1');
9+
?>
710
--FILE--
811
<?php
912
$millitimestamp = 1428133423941.0; // 14:43:43 April 04 2015

0 commit comments

Comments
 (0)