forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed bug #69398 IntlDateFormatter formatObject returns wrong value w…
…hen time style is NONE
- Loading branch information
Showing
2 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--TEST-- | ||
IntlDateFormatter::formatObject(): returns wrong value when time style is NONE. | ||
--SKIPIF-- | ||
<?php | ||
if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?> | ||
<?php if (version_compare(INTL_ICU_VERSION, '50.1.2') < 0) die('skip for ICU >= 51.1.2'); ?> | ||
--FILE-- | ||
<?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"; | ||
?> | ||
==DONE== | ||
|
||
--EXPECTF-- | ||
04/04/2015 | ||
15. 4. 4. | ||
==DONE== | ||
|
||
|