xref: /PHP-7.1/ext/intl/tests/bug69398.phpt (revision 113213f0)
1--TEST--
2IntlDateFormatter::formatObject(): returns wrong value when time style is NONE.
3--SKIPIF--
4<?php
5if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
6<?php if (version_compare(INTL_ICU_VERSION, '50.1.2') < 0) die('skip for ICU >= 51.1.2'); ?>
7--FILE--
8<?php
9$millitimestamp = 1428133423941.0; // 14:43:43 April 04 2015
10$date = IntlCalendar::createInstance('Asia/Ho_Chi_Minh');
11$date->setTime($millitimestamp);
12echo IntlDateFormatter::formatObject($date, array(IntlDateFormatter::SHORT, IntlDateFormatter::NONE), 'vi_VN'), "\n";
13echo IntlDateFormatter::formatObject ($date, array(IntlDateFormatter::SHORT, IntlDateFormatter::NONE), 'ko_KR'), "\n";
14?>
15==DONE==
16--EXPECTF--
1704/04/2015
1815. 4. 4.
19==DONE==
20