Re: [PHP] Find the last friday of each month.

2003-10-26 Thread Tyler Lane
OrangeHairedBoy wrote: Hi all, I'm trying to write a script to get the next last friday of the month and I am failing miserably. It keeps giving me October 10th. So, I scrapped it. Basically, I just want to show what the last friday of the month is, and if that date has already passed, show the l

Re: [PHP] Find the last friday of each month.

2003-10-26 Thread Evan Nemerson
Search for 'doomsday algorithm' on google. Once you grok it, you should be able to figure out the last friday quite easily. On Sunday 26 October 2003 11:37 am, OrangeHairedBoy wrote: > Hi all, > > I'm trying to write a script to get the next last friday of the month and I > am failing miserably.

Re: [PHP] Find the last friday of each month.

2003-10-26 Thread Bob Hockney
Bob wrote: > The last friday of the following month will be the last friday of the current > month + the number of day in the current month > 28 ( date("t") - 28 ). OOPS! I meant the The last friday of the following month will be the *date* of the last friday of the current month MINUS the num

[PHP] Find the last friday of each month.

2003-10-26 Thread OrangeHairedBoy
Hi all, I'm trying to write a script to get the next last friday of the month and I am failing miserably. It keeps giving me October 10th. So, I scrapped it. Basically, I just want to show what the last friday of the month is, and if that date has already passed, show the last friday of the next

Re: [PHP] Find the last friday of each month.

2003-10-26 Thread Greg Wiley
Evan Nemerson wrote: Search for 'doomsday algorithm' on google. Once you grok it, you should be able to figure out the last friday quite easily. On Sunday 26 October 2003 11:37 am, OrangeHairedBoy wrote: Hi all, I'm trying to write a script to get the next last friday of the month and I am f

Re: [PHP] Find the last friday of each month.

2003-10-26 Thread Bob Hockney
> OrangeHairedBoy wrote: > >Basically, I just want to show what the last friday of the month is, and if > >that date has already passed, show the last friday of the next month. > > You can get the number of days in a month from date() > > Now you know that the last Friday of the month will be at