• 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: 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: Re: Week of year - odd/even week
  • From: "Marc K. Myers" <email@hidden>
  • Date: Thu, 31 Jan 2002 18:50:47 -0500
  • Organization: [very little]

> 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]


  • Follow-Ups:
    • Re: Week of year - odd/even week
      • From: John W Baxter <email@hidden>
  • Prev by Date: Re: Scripting Additions: Embracing the Horror of Unix
  • Next by Date: Re: Getting Mac OS X's Ethernet Address/Hostname via AppleScript
  • Previous by thread: Re: Week of year - odd/even week
  • Next by thread: Re: Week of year - odd/even week
  • Index(es):
    • Date
    • Thread