ID: 45534 User updated by: georgew at rationalcomputing dot ca Reported By: georgew at rationalcomputing dot ca -Status: Open +Status: Bogus Bug Type: Date/time related Operating System: Windows Vista PHP Version: 5.2.6 New Comment:
The issue was a misunderstanding of the 1st and 2nd days of RH. Sorry for the alert Previous Comments: ------------------------------------------------------------------------ [2008-07-16 21:36:27] georgew at rationalcomputing dot ca Description: ------------ The Jewish date for Yom Kippur and Rosh Hashanah are consistently 1 day off. I attempted to reproduce these days for the next 10 years and converting them to Gregorian dates and below are my results. Please note I am using 1,1,5769 to 1,1,5778 for Rosh Hashanah (the 2nd day) and 1,10,5769 to 1,10,5778 for Yom Kippur as shown in the reproduce code section below. Also, I have done it for the other Jewish holidays and although I have not thoroughly tested there it seems correct for those. Reproduce code: --------------- function heb_greg($hebmon,$hebday,$hebyear) { return jdtogregorian(jewishtojd($hebmon,$hebday,$hebyear)); } echo (heb_greg(1,1,5769)),"<br>" ; echo (heb_greg(1,10,5769)),"<br>" ; echo (heb_greg(1,1,5770)),"<br>" ; echo (heb_greg(1,10,5770)),"<br>" ; echo (heb_greg(1,1,5771)),"<br>" ; echo (heb_greg(1,10,5771)),"<br>" ; echo (heb_greg(1,1,5772)),"<br>" ; echo (heb_greg(1,10,5772)),"<br>" ; echo (heb_greg(1,1,5773)),"<br>" ; echo (heb_greg(1,10,5773)),"<br>" ; echo (heb_greg(1,1,5774)),"<br>" ; echo (heb_greg(1,10,5774)),"<br>" ; echo (heb_greg(1,1,5775)),"<br>" ; echo (heb_greg(1,10,5775)),"<br>" ; echo (heb_greg(1,1,5776)),"<br>" ; echo (heb_greg(1,10,5776)),"<br>" ; echo (heb_greg(1,1,5777)),"<br>" ; echo (heb_greg(1,10,5777)),"<br>" ; echo (heb_greg(1,1,5778)),"<br>" ; echo (heb_greg(1,10,5778)),"<br>" ; Expected result: ---------------- The expected result is: 9/30/2008 10/8/2008 9/19/2009 9/27/2009 9/9/2010 9/17/2010 9/29/2011 10/7/2011 9/17/2012 9/25/2012 9/5/2013 9/13/2013 9/25/2014 10/3/2014 9/14/2015 9/22/2015 10/3/2016 10/11/2016 9/21/2017 9/29/2017 Actual result: -------------- The actual result is 9/30/2008 10/9/2008 9/19/2009 9/28/2009 9/9/2010 9/18/2010 9/29/2011 10/8/2011 9/17/2012 9/26/2012 9/5/2013 9/14/2013 9/25/2014 10/4/2014 9/14/2015 9/23/2015 10/3/2016 10/12/2016 9/21/2017 9/30/2017 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=45534&edit=1