xref: /php-src/ext/intl/tests/bug69374.phpt (revision 3815a773)
1--TEST--
2IntlDateFormatter::formatObject(): returns wrong utf8 value when $format param is utf8 string pattern.
3--EXTENSIONS--
4intl
5--FILE--
6<?php
7$millitimestamp = 1428133423941.0; // 14:43:43 April 04 2015
8$pattern1 = '\'tháng\' MM, y'; // yMM format for Vietnamese
9$pattern2 = 'y년 MMM'; // yMM format for Korean
10$date = IntlCalendar::createInstance('Asia/Ho_Chi_Minh');
11$date->setTime($millitimestamp);
12echo IntlDateFormatter::formatObject($date, $pattern1, 'vi_VN'), "\n";
13echo IntlDateFormatter::formatObject ($date, $pattern2, 'ko_KR'), "\n";
14?>
15--EXPECT--
16tháng 04, 2015
172015년 4월
18