summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorStarla Insigna <hatkirby@fourisland.com>2009-02-25 22:42:28 -0500
committerStarla Insigna <hatkirby@fourisland.com>2009-02-25 22:42:28 -0500
commit0856656a15acfb1dead900ea6d5d05bb5813c45e (patch)
tree47f946d62a2fb3f64cd0397c7ddb4ba625f9d9c6
parent98be190dd56ff7fa422311f910e700069568db4c (diff)
downloadfourisland-0856656a15acfb1dead900ea6d5d05bb5813c45e.tar.gz
fourisland-0856656a15acfb1dead900ea6d5d05bb5813c45e.tar.bz2
fourisland-0856656a15acfb1dead900ea6d5d05bb5813c45e.zip
Tweaked Easter holidays
Easter holidays were coming a day late, so a day was ticked off of the
Easter fourmula. It does concern me, however, that this issue wasn't
discovered last year. Either there was another Easter bug last year
(maybe during the time all Easter holidays were a month late?) or my
fourmula's wrong.

I also cleaned up some of the Special Dates code.
-rwxr-xr-xincludes/specialdates.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/includes/specialdates.php b/includes/specialdates.php index 91a356e..d5706cf 100755 --- a/includes/specialdates.php +++ b/includes/specialdates.php
@@ -42,7 +42,7 @@ sd_lunar_annual('Presidents Day',2,1,3); //DateFinder
42sd_solar_annual('Valentines Day',2,14); //BG Pic; DateFinder 42sd_solar_annual('Valentines Day',2,14); //BG Pic; DateFinder
43sd_solar_multiannual('Leap Day',2,29,4,2004); //DateFinder 43sd_solar_multiannual('Leap Day',2,29,4,2004); //DateFinder
44sd_solar_annual('St Patricks Day',3,17); //DateFinder 44sd_solar_annual('St Patricks Day',3,17); //DateFinder
45sd_solar_annual('Tris CIEday',4,22); //DateFinder 45sd_solar_annual('Tri\'s CIEday',4,22); //DateFinder
46sd_solar_annual('Silence Day',4,25); //DateFinder 46sd_solar_annual('Silence Day',4,25); //DateFinder
47sd_solar_annual('WCA Day',5,5); //DateFinder 47sd_solar_annual('WCA Day',5,5); //DateFinder
48sd_lunar_annual('Mothers Day',5,7,2); //BG Pic; DateFinder; Header Pic 48sd_lunar_annual('Mothers Day',5,7,2); //BG Pic; DateFinder; Header Pic
@@ -105,10 +105,7 @@ function sd_getMonthStart($month)
105 return 0; 105 return 0;
106 } else { 106 } else {
107 $c = sd_daysInMonth($month-1)+sd_getMonthStart($month-1); 107 $c = sd_daysInMonth($month-1)+sd_getMonthStart($month-1);
108 if (date('F jS Y',sd_clearDate()+($c*60*60*24)) == 'March 31st 2008' || $month == 2) 108
109 {
110// echo($month . ':' . sd_daysInMonth($month-1) . ':' . sd_getMonthStart($month-1) . "\n");
111 }
112 return ($c); 109 return ($c);
113 } 110 }
114} 111}
@@ -209,6 +206,7 @@ function sd_easter()
209 $nWD = sd_date('N',$ys); 206 $nWD = sd_date('N',$ys);
210 if ($nWD==7) {$nWD=0;} 207 if ($nWD==7) {$nWD=0;}
211 $ys+=(60*60*24*(7-$nWD)); 208 $ys+=(60*60*24*(7-$nWD));
209 $ys-=(60*60*24);
212 sd_solar_annual('Easter',sd_date('m',$ys),sd_date('j',$ys)); 210 sd_solar_annual('Easter',sd_date('m',$ys),sd_date('j',$ys));
213 $ys-=(60*60*24*46); 211 $ys-=(60*60*24*46);
214 sd_solar_annual('Mardi Gras',sd_date('m',$ys),sd_date('j',$ys)); 212 sd_solar_annual('Mardi Gras',sd_date('m',$ys),sd_date('j',$ys));