source: src/router/php7/ext/intl/tests/bug69374.phpt @ 31874

Last change on this file since 31874 was 31874, checked in by brainslayer, 6 weeks ago

update php

File size: 781 bytes
Line 
1--TEST--
2IntlDateFormatter::formatObject(): returns wrong utf8 value when $format param is utf8 string pattern.
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$pattern1 = '\'tháng\' MM, y'; // yMM format for Vietnamese
11$pattern2 = 'y년 MMM'; // yMM format for Korean
12$date = IntlCalendar::createInstance('Asia/Ho_Chi_Minh');
13$date->setTime($millitimestamp);
14echo IntlDateFormatter::formatObject($date, $pattern1, 'vi_VN'), "\n";
15echo IntlDateFormatter::formatObject ($date, $pattern2, 'ko_KR'), "\n";
16?>
17==DONE==
18
19--EXPECTF--
20tháng 04, 2015
212015년 4월
22==DONE==
23
24
Note: See TracBrowser for help on using the repository browser.