Page 1 of 1

Calculate christ. Holidays from Easter date

Posted: Fri Sep 13, 2002 3:14 am
by leber33
Hi everyone!!!!
I have to create an table for my company which prints the christian Holidays!!!
CXalculating the easter date of the was not the problem!!! But how do i for example get the date of the Palmsunday which is (Easter day - 7 days) I have prblems with the time format.
How can I substract 7days or 48 days from a date like March 31 2002!!!!!
Do I have to convert the day in juliantime and if so how can I do It
thanx
leber33

Posted: Fri Sep 13, 2002 4:51 am
by twigletmac
Try something like this:

Code: Select all

$easter = easter_date(2002); // change 2002 to the required year
$sevendays = 7 * 24 *60 * 60;

echo 'Easter: '.date('d-M-Y', $easter);
echo '<br />';
echo 'Palm Sunday: '.date('d-M-Y', ($easter-$sevendays));
Mac

thx

Posted: Fri Sep 13, 2002 5:13 am
by leber33
Thanks I 'll give it a try!!!