Re: applescript-users digest, Vol 2 #42 - 14 msgs
Re: applescript-users digest, Vol 2 #42 - 14 msgs
- Subject: Re: applescript-users digest, Vol 2 #42 - 14 msgs
- From: "Marc K. Myers" <email@hidden>
- Date: Wed, 15 Nov 2000 13:51:57 -0500
- Organization: [very little]
Dave Balderstone wrote:
>
Date: Wed, 15 Nov 2000 11:46:07 -0600
>
To: email@hidden
>
From: Dave Balderstone <email@hidden>
>
Subject: Date of next Thursday
>
>
Is there an easy method to get the date of next Thursday in a script
>
without a lot of if/thens?
>
>
I'm working on a script to change folio dates in Xpress templates,
>
and rather than relying on a user to enter the correct date, I'd like
>
to be able to have the script say, in essence, "If (current date) is
>
Friday, December 29, 2000 then next Thursday will be January 4, 2001"
>
store that into a variable so I can extract the info I need.
>
>
Thanks in advance.
>
>
Dave Balderstone
Here's a method w/o any "ifs":
set thisDate to (current date)
set thisDay to weekday of thisDate
repeat until thisDay is Thursday
set thisDate to thisDate + (1 * days)
set thisDay to weekday of thisDate
end repeat
date string of thisDate
Marc [11/15/00 1:51:43 PM]