bug69374.phpt 699 B

12345678910111213141516171819
  1. --TEST--
  2. IntlDateFormatter::formatObject(): returns wrong utf8 value when $format param is utf8 string pattern.
  3. --EXTENSIONS--
  4. intl
  5. --SKIPIF--
  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);
  14. echo IntlDateFormatter::formatObject($date, $pattern1, 'vi_VN'), "\n";
  15. echo IntlDateFormatter::formatObject ($date, $pattern2, 'ko_KR'), "\n";
  16. ?>
  17. --EXPECT--
  18. tháng 04, 2015
  19. 2015년 4월