Last active
August 29, 2015 14:19
-
-
Save micti/c5bceae922f0c03d5eb3 to your computer and use it in GitHub Desktop.
Test script #69374 & #69398
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$millitimestamp = 1428133423941.0; // 14:43:43 April 04 2015 | |
$pattern1 = '\'tháng\' MM, y'; // yMM format for Vietnamese | |
$pattern2 = 'y년 MMM'; // yMM format for Korean | |
$date = IntlCalendar::createInstance('Asia/Ho_Chi_Minh'); | |
$date->setTime($millitimestamp); | |
echo IntlDateFormatter::formatObject($date, $pattern1, 'vi_VN'), "\n"; | |
echo IntlDateFormatter::formatObject ($date, $pattern2, 'ko_KR'), "\n"; | |
?> | |
tháng 04, 2015 | |
2015년 4월 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$millitimestamp = 1428133423941.0; // 14:43:43 April 04 2015 | |
$date = IntlCalendar::createInstance('Asia/Ho_Chi_Minh'); | |
$date->setTime($millitimestamp); | |
echo IntlDateFormatter::formatObject($date, array(IntlDateFormatter::SHORT, IntlDateFormatter::NONE), 'vi_VN'), "\n"; | |
echo IntlDateFormatter::formatObject ($date, array(IntlDateFormatter::SHORT, IntlDateFormatter::NONE), 'ko_KR'), "\n"; | |
?> | |
04/04/2015 | |
15. 4. 4. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment