Re: Rép: date/Snow Leopard changed
Re: Rép: date/Snow Leopard changed
- Subject: Re: Rép: date/Snow Leopard changed
- From: Tim Mansour <email@hidden>
- Date: Thu, 3 Sep 2009 10:48:39 +1000
2009/9/3 Christopher Nebel <email@hidden>:
> Alternatively, start with current date as the base. To get the 15th of the
> current month:
> set d to current date
> set day of d to 15
> set time of d to 0
I've just discovered that you have to be a little careful with this
method, depending on what values you're "filling in".
(example on Leopard, I assume same for SL)
set d to current date
--> date "Sunday 28 February 2010 12:00:00 am"
set day of d to 31
--> date "Wednesday 3 March 2010 12:00:00 am"
set month of d to 7
--> date "Saturday 3 July 2010 12:00:00 am"
A workaround is:
set d to current date
--> date "Sunday 28 February 2010 12:00:00 am"
set month of d to 1 -- because it has 31 days
set day of d to 31
set month of d to 7
--> date "Saturday 31 July 2010 12:00:00 am"
--
Tim Mansour <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