Re: Date-math fixes in Tiger
Re: Date-math fixes in Tiger
- Subject: Re: Date-math fixes in Tiger
- From: Nigel Garvey <email@hidden>
- Date: Mon, 16 May 2005 21:00:49 +0100
In his message of 16/5/2005 09:33 GMT, Kai wrote:
>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... ;-)
There might still a niche for my millenniumOf() handler. ;-)
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