Re: calculating US holidays

From: Date: Mon, 15 Apr 2002 21:01:11 +0000
Subject: Re: calculating US holidays
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-93086@lists.php.net to get a copy of this message
Oh, I love these 32 second answers ;-) Just type it in google and zapp http://php.resourceindex.com/Functions_and_Classes/Date_and_Time/ 1st page, second answer ! G Oliver At 15.04.2002 13:05, you wrote:
That's fine for fixed dates, and I have that figured out, but presidents day, memorial day, labor day and thanksgiving fall on different days each year. Presidents day is the third monday of February. How do I calculate that? From: "Tyler Longren" <tyler@captainjack.com> Organization: Captain Jack Communications Date: Mon, 15 Apr 2002 14:48:15 -0500 To: "Tom Beidler" <tom@orbittechservices.com>, "php list" <php-general@lists.php.net> Subject: Re: [PHP] calculating US holidays <? $month = date("m"); $day = date("d"); if ($month == "10" && $day == "31") { print "It's Halloween!"; } ?> you could do something similar to that. tyler ----- Original Message ----- From: "Tom Beidler" <tom@orbittechservices.com> To: "php list" <php-general@lists.php.net> Sent: Monday, April 15, 2002 2:17 PM Subject: [PHP] calculating US holidays
I need to calculate the date to see if it's a holiday, i.e. is today presidents day, which happens to be the third monday of february. Can someone point me to some code that can do that? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.general (#93086) next »