Bug #54294 [Fbk->NoF]: wrong result when parse ::ORDINAL strings ->parse("2nd")
| From: | php-bugs at lists dot php dot net | Date: | Sun, 25 Oct 2020 04:22:08 +0000 |
| Subject: | Bug #54294 [Fbk->NoF]: wrong result when parse ::ORDINAL strings ->parse("2nd") | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-229906@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=54294&edit=1
ID: 54294
Updated by: php-bugs@lists.php.net
Reported by: giorgio dot liscio at email dot it
Summary: wrong result when parse ::ORDINAL strings
->parse("2nd")
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: I18N and L10N related
Operating System: all ? windows7 x64
PHP Version: 5.3.5
Assigned To: cmb
Private report: N
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2020-10-13 11:30:43] cmb@php.net
I cannot reproduce: <https://3v4l.org/hLYvp>. Might have
been a
bug in PHP 5.3/5.4 or an upstream bug, which has been fixed in the
meantime. Or can you still reproduce this with any of the
actively supported PHP versions[1]?
[1] <https://www.php.net/supported-versions.php>
------------------------------------------------------------------------
[2011-03-17 15:00:13] giorgio dot liscio at email dot it
Description:
------------
hi
define("E", "\n");
$round = new \NumberFormatter("en", \NumberFormatter::ORDINAL);
echo $round->format(6).E; // OUTPUTS 6th
$round = new \NumberFormatter("en", \NumberFormatter::ORDINAL);
echo var_dump($round->parse("6th")).E; // OUTPUTS float 122!!!
echo $round->getErrorMessage().E; // ZERO ERROR
gives me error only with "en-*" locale
this works good:
$round = new \NumberFormatter("it_IT", \NumberFormatter::ORDINAL);
echo var_dump($round->parse("6°")).E; // OUTPUTS float 6
echo var_dump($round->parse("123esimo")).E; // OUTPUTS float 123
echo $round->getErrorMessage().E; // ZERO ERROR
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=54294&edit=1