• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Has the 5th business day of the month passed???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: Subject: RE: Saving MS Word Pages as Docs
  • Next by Date: Re: AppleScript e-mail encode/decode tool
  • Previous by thread: Re: Has the 5th business day of the month passed???
  • Next by thread: RE: Has the 5th business day of the month passed???
  • Index(es):
    • Date
    • Thread