Re: date/Snow Leopard changed
Re: date/Snow Leopard changed
- Subject: Re: date/Snow Leopard changed
- From: "Mark J. Reed" <email@hidden>
- Date: Mon, 7 Sep 2009 10:17:56 -0400
And actually, I'm coming to the conclusion that this is a bug. List
assignment is supposed to logically occur in parallel, which is why
this works:
set {a,b} to {b,a}
So you should be able to set all the components of a date at once with
no side effects until they're all set to the given values.
On 9/7/09, Nigel Garvey <email@hidden> wrote:
> Paul Berkowitz wrote on Sun, 06 Sep 2009 23:13:47 -0700:
>
>>On 9/6/09 6:32 PM, "email@hidden" <email@hidden> wrote:
>>
>>> More longwinded than the Hypertalk example but should get the job done?
>>
>>Slightly shorter-winded, perhaps:
>>
>>set TestDate to current date
>>tell TestDate to set {its year, its month, its day, its hours, its minutes,
>>its seconds} to {2000, 1, 2, 3, 4, 5}
>>
>>It makes no difference what order you put the lists, as long as the value
>>you want corresponds to the same position in the property list, of course.
>
> It _does_ matter what order you set the day, month, and year, especially
> if you're starting with 'current date'. It's best to start with a known
> "safe" date (low day number and/or 31-day month) and set the year, month,
> and day in that order.
>
> set TestDate to date "1/1/1"
> tell TestDate to set {its year, its month, its day, its hours, its
> minutes, its seconds} to {2000, 1, 2, 3, 4, 5}
>
> NG
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
>
--
Sent from my mobile device
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden