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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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: Fri Apr 19 22:01:28 2024 UTC