Re: Last day of month....
Re: Last day of month....
- Subject: Re: Last day of month....
- From: Nigel Smith <email@hidden>
- Date: Thu, 21 Nov 2002 18:06:09 +0000
On 21/11/02 5:21 am, "David Crowe" <email@hidden> wrote:
>
Here's a 1 line script that determines the last day of the month
>
without try blocks ... and in one line too!
>
>
>
set LastDayOfMonth to 27 + ((((date " March 1, 2003") - (date
>
"February 28, 2003")) / (24 * 3600)) as integer)
Or, and shorter still,
set lastDayOfMonth to day of (date "March 1, 2003" - 1)
This implies you know the month after the month you want to know the last
day of, in which case the generic version is:
--------
return day of ((date ("" & month of nextMonth)) - 1)
--------
Nigel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.