WTF? isnt this the second time today this has appeared on the list?

Dude, other than the people in the UK nobody cares about
UK bank holidays...search google for this query and maybe someone from
there has written something for it..or read the manual a couple of times and
you'll see that the bottom question is a real dumb one.


Ryan: Well, that's not a very nice way to treat someone on the list, even if it was the second time you'd seen the question in the same day or even if it was a question that is obviously in the manual. Some people are just at different proficiencies in their learning process and don't yet know to go to the manual for certain questions. If we treated every newbie like this, then we wouldn't have people coding in PHP!


Shaun: Consequently, the question was a valid one that the manual could not answer, and the short answer is, "no." PHP does not have an intrensic way of telling on what dates UK banking holidays fall (mainly because not everyone coding PHP lives in the UK). You will need to write your own function for this. The easiest way would be to just look at a calendar for several years in advance and just plug all the dates into an array and test the array to see if today's day is in there. If it is, then today is a banking holiday.

Hope that helps.

--
Regards,
 Ben Ramsey
 http://benramsey.com
 http://www.phpcommunity.org/wiki/People/BenRamsey

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



Reply via email to