xref: /PHP-8.3/ext/intl/tests/bug69398.phpt (revision 333cf3c1)
1--TEST--
2IntlDateFormatter::formatObject(): returns wrong value when time style is NONE.
3--EXTENSIONS--
4intl
5--SKIPIF--
6<?php
7if (version_compare(INTL_ICU_VERSION, '50.1.2') < 0) die('skip for ICU < 51.1.2');
8if (version_compare(INTL_ICU_VERSION, '74.1') >= 0) die('skip for ICU >= 74.1');
9?>
10--FILE--
11<?php
12$millitimestamp = 1428133423941.0; // 14:43:43 April 04 2015
13$date = IntlCalendar::createInstance('Asia/Ho_Chi_Minh');
14$date->setTime($millitimestamp);
15echo IntlDateFormatter::formatObject($date, array(IntlDateFormatter::SHORT, IntlDateFormatter::NONE), 'vi_VN'), "\n";
16echo IntlDateFormatter::formatObject ($date, array(IntlDateFormatter::SHORT, IntlDateFormatter::NONE), 'ko_KR'), "\n";
17?>
18--EXPECT--
1904/04/2015
2015. 4. 4.
21