Re: Coping with Date format variations
Re: Coping with Date format variations
- Subject: Re: Coping with Date format variations
- From: Shane Stanley <email@hidden>
- Date: Mon, 24 May 2010 14:57:46 +1000
- Thread-topic: Coping with Date format variations
On 24/5/10 2:15 PM, "Michelle Steiner" <email@hidden> wrote:
> set foo to current date
> set {month of foo, day of foo, year of foo, time of foo} to {October, 31,
> 2015, 0}
> foo
That's still potentially going to get the wrong result. For example:
set foo to current date
set {month of foo, day of foo, year of foo, time of foo} to {October, 31,
2015, 0}
log foo -- OK
set {month of foo, day of foo, year of foo, time of foo} to {February, 8,
2015, 0}
log foo -- not OK
Before setting the values you want, you need to either set the month to one
that has 31 days or set the day to 28 or less. Otherwise you can't guarantee
that setting the month or day will not inadvertently change the month.
--
Shane Stanley <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