• 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: Date-math fixes in Tiger
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Date-math fixes in Tiger


  • Subject: Re: Date-math fixes in Tiger
  • From: Nigel Garvey <email@hidden>
  • Date: Mon, 16 May 2005 03:43:44 +0100

Tom Robinson wrote on Sat, 14 May 2005 11:33:09 +1200:

>And did you see the new properties?
>
>> The date class now has hours, minutes, and seconds properties. The
>> hours property always uses a 24-hour clock. [3516702]
>>
>> The month property of the date class can now be set to an integer.
>> [3525546]
>>
>> The weekday constants can now be coerced to numbers. Sunday is 1.
>> [3639194]

Looks good. It makes the date class seem more "complete" and should be
easier for newbies who have problems parsing the time - provided they're
writing for Tiger or later, of course.

For people who prefer weeks starting on Mondays, there's:

  ((myDate's weekday as integer) - 8) mod 7 + 7

... or:

  (myDate - (date "Monday, 6 January 1000 00:00:00")) mod weeks div days
+ 1

... or even, I suppose:

  item (myDate's weekday as integer) of {7, 1, 2, 3, 4, 5, 6}

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

  • Follow-Ups:
    • Re: Date-math fixes in Tiger
      • From: kai <email@hidden>
  • Prev by Date: Image Events in Tiger Weirdness?
  • Next by Date: Re: Script Editor hangs on "Open Dictionary"
  • Previous by thread: Re: Date-math fixes in Tiger
  • Next by thread: Re: Date-math fixes in Tiger
  • Index(es):
    • Date
    • Thread