Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Week of year - odd/even week
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Week of year - odd/even week



> Subject: Week of year - odd/even week
> Date: Thu, 31 Jan 2002 12:58:23 -0800
> From: martin schiller <email@hidden>
> To: "AS users" <email@hidden>
>
> Can anyone help me with some pointers or a routine to determine the week
> of the year? I'm trying to set a script to send me a reminder to put out
> the yard waste container on alternate weeks.

set strtDate to date ("01/01/" & year of (current date))
set dtOffset to (current date) - strtDate
set currWeek to dtOffset div weeks + 1
if currWeek mod 2 = 0 then
display dialog "This is an even week"
else
display dialog "This is an odd week"
end if

Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074

[1/31/02 6:50:03 PM]




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.