Re: [PHP] Last working day of a month

2008-12-04 Thread Andrew Ballard
On Thu, Dec 4, 2008 at 9:03 AM, Angelo Zanetti [EMAIL PROTECTED] wrote: Hi all, I am busy trying to figure out how to get the last working day in a month. I was wondering if there was a script already written, but this is what I imagine should work: Get the current day and see if it's the

[PHP] Last working day of a month

2008-12-04 Thread Angelo Zanetti
Hi all, I am busy trying to figure out how to get the last working day in a month. I was wondering if there was a script already written, but this is what I imagine should work: Get the current day and see if it's the last day of the month. If its true check if it's a Saturday or Sunday if

RE: [PHP] Last working day of a month

2008-12-04 Thread Boyd, Todd M.
-Original Message- From: Andrew Ballard [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2008 8:32 AM To: Angelo Zanetti Cc: php-general@lists.php.net Subject: Re: [PHP] Last working day of a month Importance: Low On Thu, Dec 4, 2008 at 9:03 AM, Angelo Zanetti [EMAIL

Re: [PHP] Last working day of a month

2008-12-04 Thread Jochem Maas
Angelo Zanetti schreef: Hi all, I am busy trying to figure out how to get the last working day in a month. I was wondering if there was a script already written, but this is what I imagine should work: Get the current day and see if it's the last day of the month. If its true check if

Re: [PHP] Last working day of a month

2008-12-04 Thread Govinda
you need a process with a few simple steps. 1. find the last day of the month, this is quite easy ... google gives answers as does the manual. e.g.: http://lutrov.com/blog/php-last-day-of-the-month-calculation/ 2. determine if this is a week day. if yes go to step three else 'roll the