Re: Simple date question
Re: Simple date question
- Subject: Re: Simple date question
- From: Bernardo Hoehl <email@hidden>
- Date: Tue, 15 Mar 2005 17:25:56 -0300
Thanks Paul, Andrew and Adam.
You all have been veru helpfull,
Bernardo
On 15 Mar, 2005, at 4:12 PM, Paul Berkowitz wrote:
On 3/15/05 11:01 AM, I wrote:
On 3/15/05 10:40 AM, "Bernardo Hoehl" <email@hidden> wrote:
This is a simpe one:
How do I get the last day of the current month?
Example: february 2005 = 28 or March =31
set theDate to (current date)
set day of theDate to 1
set theDate to theDate + (31 * days)
--oops
set day of theDate to 1
set theDate to theDate - (1 * days)
set d to day of theDate
Actually that's no good if today is Jan 30, for example. It would get
the
last day of _next_ month (28) instead of this month (31).
Andrew's way (which might originally be Nigel's way, in fact) -
setting the
day to 32 - is accurate in all cases.
--
Paul Berkowitz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to 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:
This email sent to email@hidden