Re: Number of days left in the month
Re: Number of days left in the month
- Subject: Re: Number of days left in the month
- From: Emmanuel <email@hidden>
- Date: Thu, 21 Nov 2002 22:56:51 +0100
At 6:32 PM +0000 21/11/02, Nigel Garvey wrote:
I contributed a later version of this to the discussion on
alt.comp.lang.applescript yesterday - and then realised about three hours
later that it could be simplified to:
on daysInMonth(theDate)
copy theDate to tmpDate
set tmpDate's day to 32
return 32 - (tmpDate's day)
end daysInMonth
Now the one-liner:
tell theDate to 32 - (((date ("1 " & its month & " " & its year)) +
31 * days)'s day) returning x
Emmanuel
See? you can't "set x to tell blah" but you can "tell blah returning x".
_______________________________________________
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.