php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79722 IntlDateFormatter::getPattern() for ar locale returns extra characters
Submitted: 2020-06-21 18:29 UTC Modified: 2020-07-05 04:22 UTC
From: k dot witkowski at advoxstudio dot com Assigned: cmb (profile)
Status: No Feedback Package: I18N and L10N related
PHP Version: 7.2.31 OS: Ubuntu 18.04 + docker
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: k dot witkowski at advoxstudio dot com
New email:
PHP Version: OS:

 

 [2020-06-21 18:29 UTC] k dot witkowski at advoxstudio dot com
Description:
------------
Wrong value of pattern for arabic locales.

Test script:
---------------
php > $dateFormat = new \IntlDateFormatter('ar_MO', \IntlDateFormatter::SHORT, \IntlDateFormatter::NONE);
php > echo htmlentities($dateFormat->getPattern());

Expected result:
----------------
d/M/y

Actual result:
--------------
d‏/M‏/y

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-06-22 11:47 UTC] cmb@php.net
-Status: Open +Status: Feedback -Package: intl +Package: I18N and L10N related -Assigned To: +Assigned To: cmb
 [2020-06-22 11:47 UTC] cmb@php.net
These right-to-left marks look fine to me:
<https://3v4l.org/c4vFQ>.
 [2020-06-23 08:40 UTC] k dot witkowski at advoxstudio dot com
-Status: Feedback +Status: Assigned
 [2020-06-23 08:40 UTC] k dot witkowski at advoxstudio dot com
If you use these patterns with date() you receive wrongly formatted output

https://3v4l.org/DUlfj
 [2020-06-23 09:18 UTC] cmb@php.net
-Status: Assigned +Status: Feedback
 [2020-06-23 09:18 UTC] cmb@php.net
Yes, but I don't think that PHP claims these format strings to be
compatible in any way.
 [2020-07-05 04:22 UTC] php-bugs at lists dot php dot net
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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 04:01:29 2024 UTC