|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75990 Wrong date convert in persian calendar
Submitted: 2018-02-21 13:50 UTC Modified: 2018-02-21 19:21 UTC
From: mhd dot jalilvand at gmail dot com Assigned: cmb (profile)
Status: Not a bug Package: intl (PECL)
PHP Version: 5.6.33 OS: linux centos
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.
Block user comment
Status: Assign to:
Bug Type:
From: mhd dot jalilvand at gmail dot com
New email:
PHP Version: OS:


 [2018-02-21 13:50 UTC] mhd dot jalilvand at gmail dot com
I have tested in many environment and versions and i got same bug in all.

Test script:
$time1 = strtotime('2017-3-18');
$time2 = strtotime('2017-3-19');
$formater = new \IntlDateFormatter('en_US' . '@calendar=persian' ,
					\IntlDateFormatter::FULL,  \IntlDateFormatter::FULL, 'Asia/Tehran',
					\IntlDateFormatter::TRADITIONAL, 'Y-M-d');
echo $formater->format($time1);
// return correct Persian date:1395-12-28

echo $formater->format($time2);
// returns wrong Persian date:1396-12-29 Its year in increased by 1


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-02-21 19:21 UTC]
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2018-02-21 19:21 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

Y means the year of "week of the year" – you'll want to use the
lowercase y, see <>.
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Feb 19 13:01:30 2020 UTC