|
From: Florin C B. <ory...@us...> - 2013-04-30 23:02:01
|
Update of /cvsroot/mxbb/mx_calsnails/includes In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv16748 Modified Files: cal_functions.php Log Message: phpBB3 bbcode update Index: cal_functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_calsnails/includes/cal_functions.php,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** cal_functions.php 29 Apr 2013 05:04:26 -0000 1.25 --- cal_functions.php 30 Apr 2013 23:01:58 -0000 1.26 *************** *** 2200,2205 **** $G = $year % 19; $C = (int)($year / 100); ! $H = (int)($C - (int)($C / 4) - (int)((8*$C+13) / 25) + 19*$G + 15) % 30; ! $I = (int)$H - (int)($H / 28)*(1 - (int)($H / 28)*(int)(29 / ($H + 1))*((int)(21 - $G) / 11)); //$S21 = date("$year-03-21"); if($I <= 10) --- 2200,2205 ---- $G = $year % 19; $C = (int)($year / 100); ! $H = (int)($C - (int)($C / 4) - (int)((8 * $C + 13) / 25) + 19 * $G + 15) % 30; ! $I = (int)$H - (int)($H / 28) * (1 - (int)($H / 28)*(int)(29 / ($H + 1)) * ((int)(21 - $G) / 11)); //$S21 = date("$year-03-21"); if($I <= 10) *************** *** 2213,2218 **** $GregLunarDay = str_pad($I - 10, 2, '0', STR_PAD_LEFT); $PascalunarDay = str_pad($I - 11, 2, '0', STR_PAD_LEFT); ! $GregLunarMonth = 04; ! } $J = ($year + (int)($year / 4) + $I + 2 - $C + (int)($C / 4)) % 7; $L = $I - $J; --- 2213,2219 ---- $GregLunarDay = str_pad($I - 10, 2, '0', STR_PAD_LEFT); $PascalunarDay = str_pad($I - 11, 2, '0', STR_PAD_LEFT); ! $GregLunarMonth = 04; ! } ! $J = ($year + (int)($year / 4) + $I + 2 - $C + (int)($C / 4)) % 7; $L = $I - $J; *************** *** 2220,2237 **** $OmerDay = $L + 28 - 31 * ((int)($m / 4)); $OmerMonth = 3 + (int)(($L + 40) / 44); ! //$lagBaOmerDay = $L + 28 + 3 - 31 * ((int)($m / 4)); //+ 33 - 31 ! $lagBaOmerDay = 18 + $OmerDay - $GregLunarDay; //18 $lagBaOmerMonth = 4 + (int)(($L + 40) / 44); ! //$PalmSunday = addDays($OmerDay, -7); //Christian Lamb Day ! //$LaetareSunday = addDays($OmerDay, -21); ! //$GoodFriday = addDays($OmerDay, -2); ! //$HolyThursday = addDays($OmerDay, -3); ? ! //$ShroveTuesday = addDays($OmerDay, -47); ? ! //$AshWednesday = addDays($OmerDay, -46); ? ! //$AscensionDay = addDays($OmerDay, 39); ! $ShavuotDay = 6 + $OmerDay - $GregLunarDay; //6 ! //$Pentecost = addDays($OmerDay, 49); //6 switch ($mode) --- 2221,2264 ---- $OmerDay = $L + 28 - 31 * ((int)($m / 4)); $OmerMonth = 3 + (int)(($L + 40) / 44); ! ! $lagBaOmerDay = 18 + $OmerDay - $GregLunarDay; //18 = 30 $lagBaOmerMonth = 4 + (int)(($L + 40) / 44); + $AscensionDay = 25 + $OmerDay - $GregLunarDay; //25 = 40 ! //1st omer is from 16 to 22 Nisan in Hag Matzot Shavua after Shabbbath is down ! $JOmerDay01 = $this->caldean_date('JDay', $OmerMonth, $OmerDay, $year); ! //$JOmerYear = $this->caldean_date('JYear', $OmerMonth, $OmerDay, $year); ! if($JOmerDay01 <= 20) ! { ! $AliyahDay = $JOmerDay01 + 9; //offset 40 - 30 = 10 | 40 days = 10 days + one month of 30 days ! $AliyahMonth = 10; //Sivan ! $AscensionMonth = 05; //May ! $AscensionYear = $year; //$this->JewishToGreg('GYear', $AliyahMonth, $AliyahDay, $JOmerYear); ! } ! else ! { ! $AliyahDay = $JOmerDay01 - 20; //offset: 30 - 20 = 10 | 40 days = 10 days + one month of 30 days ! $AliyahMonth = 11; //Tamuz ! $AscensionMonth = 06; //June ! $AscensionYear = $year; //$this->JewishToGreg('GYear', $AliyahMonth, $AliyahDay, $JOmerYear); ! } ! ! //$JOmerDay30 = $JOmerDay01; ! //$JOmerDay33 = $JOmerDay01 + 3; //18 = 30 ! //$AscensionMonth = 5 + (int)(($L + 40) / 44); ! ! //$GregPentecostMonth = $GregLunarMonth + 2; ! ! //$PalmSunday = $this->addDays($OmerDay, -7); //Christian Lamb Day ! //$LaetareSunday = $this->addDays($OmerDay, -21); ! //$GoodFriday = $this->addDays($OmerDay, -2); ! ! //$HolyThursday = $this->addDays($OmerDay, -3); ? ! //$ShroveTuesday = $this->addDays($OmerDay, -47); ? ! //$AshWednesday = $this->addDays($OmerDay, -46); ? ! //$AscensionDay = $this->addDays($OmerDay, 39); ! $ShavuotDay = 6 + $OmerDay - $GregLunarDay; //6 Sivan offset +- max 5-6 days = day 50 ! //$PentecostDay = $this->addDays($OmerDay, 49); //Gregorian switch ($mode) *************** *** 2250,2254 **** break; case 'JOmerDay': ! return $this->caldean_date('JDay', $OmerMonth, $OmerDay, $year); break; case 'BaOmerMonth': --- 2277,2281 ---- break; case 'JOmerDay': ! return $JOmerDay01; //$JOmerDay01 break; case 'BaOmerMonth': *************** *** 2256,2267 **** break; case 'BaOmerDay': ! return $lagBaOmerDay; break; case 'BOmerDay': ! return $this->caldean_date('JDay', $lagBaOmerMonth, $lagBaOmerDay, $year); break; case 'AscensionDay': return $AscensionDay; break; case 'PentecostDay': return $PentecostDay; --- 2283,2297 ---- break; case 'BaOmerDay': ! return $lagBaOmerDay; //hebcal offset break; case 'BOmerDay': ! return $this->caldean_date('JDay', $lagBaOmerMonth, $lagBaOmerDay, $year); //gregorian cal hebday break; case 'AscensionDay': return $AscensionDay; break; + case 'AliyahDay': + return $AliyahDay; // 40 days + break; case 'PentecostDay': return $PentecostDay; *************** *** 2491,2495 **** 'yomHaAzmaut' => array('native' => '××× ×עצ×××ת', 'foreign' => t('Yom HaAtsmaut'), 'class' => 'khol'), 'lagBaOmer' => array('native' => '×"× ××¢××ר', 'foreign' => t('Lag BaOmer'), 'class' => 'omer khol'), ! 'yomYerishalayim' => array('native' => '××× ×ר×ש×××', 'foreign' => t('Yom Yerushalayim'), 'class' => 'khol'), // Sivan 'shavuotErevKhag' => array('native' => '×¢×¨× ×©×××¢×ת', 'foreign' => t('Erev Shavuot'), 'class' => 'khol'), --- 2521,2527 ---- 'yomHaAzmaut' => array('native' => '××× ×עצ×××ת', 'foreign' => t('Yom HaAtsmaut'), 'class' => 'khol'), 'lagBaOmer' => array('native' => '×"× ××¢××ר', 'foreign' => t('Lag BaOmer'), 'class' => 'omer khol'), ! ! 'yomAscension' => array('native' => '××× ××¢××××', 'foreign' => t('Yom HaAliyah'), 'class' => 'khol'), ! 'yomYerishalayim' => array('native' => '××× ×ר×ש×××', 'foreign' => t('Yom Yerushalayim'), 'class' => 'khol'), // Sivan 'shavuotErevKhag' => array('native' => '×¢×¨× ×©×××¢×ת', 'foreign' => t('Erev Shavuot'), 'class' => 'khol'), *************** *** 2626,2629 **** --- 2658,2664 ---- if ($j_month == IYAR || !$j_month) { + $b = $this->passover_day('BaOmerDay', $g_year, $j_year); //18 + $a = $this->passover_day('AliyahDay', $g_year, $j_year); //23 + //print_r("$a"); $d->set($j_year, IYAR, 4); // Rule #1: thu,fri -> wed *************** *** 2650,2655 **** } $list[$d->month][$d->day][] = 'yomHaAzmaut'; ! $b = $this->passover_day('BaOmerDay', $g_year, $j_year); //18 $list[IYAR][$b][] = 'lagBaOmer'; $list[IYAR][28][] = 'yomYerishalayim'; if ($sefirat_omer) --- 2685,2692 ---- } $list[$d->month][$d->day][] = 'yomHaAzmaut'; ! $list[IYAR][$b][] = 'lagBaOmer'; + $list[IYAR][25][] = 'yomAscension'; + $list[IYAR][$a][] = 'yomAscension'; $list[IYAR][28][] = 'yomYerishalayim'; if ($sefirat_omer) |