|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-07-17 12:56 UTC] georgew at rationalcomputing dot ca
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 21:00:01 2025 UTC |
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