Re: Suggestions?

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

 



On Tue, Jan 13, 2009 at 2:09 PM, Eric Butera <eric.butera@xxxxxxxxx> wrote:

>  Are you asking how to do
>
> $holidays[] = date;
> array_push($holidays, date); ?
>
> If you were generating dates to compare against today tho, you could
> just return upon a match at that point and not even store them.  No
> point in creating some big array in a loop only to loop through it
> again when you could have done it the first time around.  I'd put this
> into a function though so that I could return out upon a match.
>
Not to only compare against today.

I want to determine if any of the holiday dates are equal to or between
dates in a date range.

For example:

I need to calculate 2 business days from today.

Today is Wednesday December 23rd.

December 24th and 25th are holidays. December 26th and 27th are the weekend.

So 2 business days from December 23rd would be December 29th.

So multiple holiday dates could fall into the range I am trying to get so I
would think I'd need to loop through all of the holidays to catch all of the
holidays that may fall within the range and add an additional day as needed
to get the correct business day.

[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