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: Fri, 22 Nov 2002 15:11:22 +0100
At 9:46 AM +0000 22/11/02, Nigel Garvey wrote:
tell theDate to 32 - (((date ("1 " & its month & " " & its year)) +
>>31 * days)'s day) returning x
tell theDate to 32 - ((it + (32 - (its day)) * days)'s day) returning x
Waow. That one is pretty cleaner.
On the same scheme, you can get the number of seconds in the day:
--------------------------
tell theDate to 99999 - ((it + (99999 - (its time)))'s time) returning x
--> 86400
--------------------------
(IIRC there has been in the past a date which would not give 86400,
but I don't remember when it was)
> you can't "set x to tell blah" but you can "tell blah returning x".
And you can "tell blah to set x".
Yes. My point was to be copy-paste compatible.
Emmanuel
_______________________________________________
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.