• 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: Days and hours
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Days and hours


  • Subject: Re: Days and hours
  • From: "Nigel Garvey" <email@hidden>
  • Date: Tue, 25 Oct 2005 01:01:27 +0100

I wrote on Mon, 24 Oct 2005 22:42:38 +0100:

>>on localizedMonths()
>>     set l to {}
>>     tell "1 1 1" to tell (my date it) - days to repeat 12 times
>>         set day to 32
>>         tell it + days * (9 - (its weekday)) to set l's end to space
>>& date string & space
>>     end repeat
>
>Here's a minor modification for compatibility with systems that don't
>have the weekday-to-integer coercion:
>
>  on localizedMonths()
>    tell "1 1 1" to tell (my date it)
>      copy it to km -- "Known Monday"
>      set l to {space & date string & space}
>      repeat 11 times
>        set day to 32
>        tell it + (km - it) mod weeks to set l's end to space & date
>string & space
>      end repeat
>    end tell

Sorry. I posted the wrong experiment. You have to set day to 39 for this
one to give yourself some floor room in the new months:

  on localizedMonths()
    tell "1 1 1" to tell (my date it)
      copy it to km -- "Known Monday"
      set l to {space & date string & space}
      repeat 11 times
        set day to 39
        tell it + (km - it) mod weeks to set l's end to space & date
string & space
      end repeat
    end tell

NG

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Days and hours (From: "Nigel Garvey" <email@hidden>)

  • Prev by Date: Re: items selected
  • Next by Date: Re: Days and hours
  • Previous by thread: Re: Days and hours
  • Next by thread: Re: Days and hours
  • Index(es):
    • Date
    • Thread