Re: Has the 5th business day of the month passed???
Re: Has the 5th business day of the month passed???
- Subject: Re: Has the 5th business day of the month passed???
- From: Nigel Garvey <email@hidden>
- Date: Thu, 22 Feb 2001 00:20:40 +0000
"Bourque, Jason" wrote on Wed, 21 Feb 2001 12:07:30 -0500:
>
Hello,
>
>
I need to confirm that the fifth business day of the month has passed before
>
continueing on with a script.
>
I have done it successfully but I ask is there a better way.
>
>
here's my code
Hi, Jason.
Your script works effectively, but it's possible to compress the logic a
bit. Taking "business day" to mean "Monday to Friday inclusive, ingnoring
public holidays", the first five such days in a month all fall within the
first seven days, so any date after that can flag 'true'. The 6th only
clears five business days if it's a Saturday and the 7th only if it's a
Saturday or Sunday. Any other situation should flag 'false'. Jeff Baumann
should avert his gaze now:
tell (current date) to set fifthBusinessDay to its day > 7 or (its day
>
5 and its weekday is Saturday) or (its day is 7 and its weekday is Sunday)
NG