Bug #54294 [Opn->Fbk]: wrong result when parse ::ORDINAL strings ->parse("2nd")
| From: | cmb@php.net | Date: | Tue, 13 Oct 2020 11:30:43 +0000 |
| Subject: | Bug #54294 [Opn->Fbk]: wrong result when parse ::ORDINAL strings ->parse("2nd") | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-229593@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: cmb@php.net
Reported by: giorgio dot liscio at email dot it
Summary: wrong result when parse ::ORDINAL strings
->parse("2nd")
-Status: Open
+Status: Feedback
Type: Bug
Package: I18N and L10N related
Operating System: all ? windows7 x64
PHP Version: 5.3.5
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
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>
Previous Comments:
------------------------------------------------------------------------
[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