Bug #76226 [NEW]: Wrong Year for the last 5 Days of the year in fa_IR
| From: | adeli dot farhad at gmail dot com | Date: | Mon, 16 Apr 2018 07:46:11 +0000 |
| Subject: | Bug #76226 [NEW]: Wrong Year for the last 5 Days of the year in fa_IR | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-214758@lists.php.net to get a copy of this message | ||
From: adeli dot farhad at gmail dot com
Operating system: Win10,CentOs6
PHP version: 5.6.35
Package: Calendar related
Bug Type: Bug
Bug description:Wrong Year for the last 5 Days of the year in fa_IR
Description:
------------
tested on php 5.6 and 7
timezone : 'Asia/Tehran'
IntlDateFormatter
locale 'fa_IR' OR "fa_IR@calendar=persian"
This happens only in the last 5-6 days of each year (12/25-26 to
12/30-31)
Only when pattern!=null
the value for the year belongs to the next year (year is +1)
example :
2018/3/17 should be 1396/12/26
for locale = 'en_US@calendar=persian' its correct
BUT
for locale = 'fa_IR' OR 'fa_IR@calendar=persian' I am getting
Û±Û³Û¹Û·/Û±Û²/Û²Û¶ which is 1397/12/26 notice the year(1397 instead of
1396)
Test script:
---------------
https://gist.github.com/Exlord/57dac123f119b9bb102b2ccf8f590d2b
--
Edit bug report at https://bugs.php.net/bug.php?id=76226&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76226&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76226&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76226&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=76226&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=76226&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=76226&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=76226&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=76226&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=76226&r=support
Expected behavior: https://bugs.php.net/fix.php?id=76226&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=76226&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=76226&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=76226&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76226&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=76226&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=76226&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=76226&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=76226&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=76226&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=76226&r=mysqlcfg