Re: IF loop

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ron Piggott wrote:

$good_Friday = easter_date($current_year)-24*3600*2;
$Easter_Sunday = easter_date($current_year)*60*60*24;

easter_date() returns a Unix timestamp. In the above code, you are taking this timestamp, then multiplying it by 60, then again by 60, then again by 24. If the Unix timestamp could cope with it, the resulting value would probably be somewhere in the next millennium ;)

I'd wager this isn't what you wanted to do. You wanted to take the timestamp and then ADD the product of 60*60*24 to it:

$sunday = easter_date($current_year) + 86400

or if you must:

$sunday = easter_date($current_year) + (60*60*24)

Same logic goes for $good_Friday.

Cheers,

Rich
--
Zend Certified Engineer
http://www.corephp.co.uk

"Never trust a computer you can't throw out of a window"

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux