• 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: kai <email@hidden>
  • Date: Mon, 16 May 2005 09:33:58 +0100


On Monday, May 16, 2005, at 03:43 am, Nigel Garvey wrote:

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}

And there I was Nigel, thinking that - with all these juicy new built-in functions and fixes - there'd be nothing left for you to tinker with in the dates department... ;-)


---
kai

_______________________________________________
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: Date-math fixes in Tiger (From: Nigel Garvey <email@hidden>)

  • Prev by Date: Re: Script Editor hangs on "Open Dictionary"
  • Next by Date: Re: My delete aged msg script - broke?
  • Previous by thread: Re: Date-math fixes in Tiger
  • Next by thread: Re: Date-math fixes in Tiger
  • Index(es):
    • Date
    • Thread