Re: Date question with weeknumber
Re: Date question with weeknumber
- Subject: Re: Date question with weeknumber
- From: Michelle Steiner <email@hidden>
- Date: Sun, 2 May 2010 14:03:02 -0700
On May 2, 2010, at 12:56 PM, Bert Groeneveld wrote: Thank you for your answer. This script works really great! I spent some time examining it but unfortunately I had to give up. I guess I don't have enough brains to exactly understand how it works. Or even better: I completely don't understand it!
I was on nomail and vacation when you posted your question, so I didn't see it until now. Here is my solution; it assumes that the first week of a year starts on the first day of that year:
set yr to 2010 set wk to 39 --39th week of year set EOW to (date ("Dec 31, " & yr - 1)) + wk * 7 * days set differential to (weekday of EOW) - Wednesday if differential is less than 1 then set differential to differential + 7 set startdate to EOW - differential * days set enddate to startdate + 6 * days -- Michelle
-- Chastity always takes its toll. In some it produces pimples; in others, sex laws. -- Karl Kraus
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden