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: has <email@hidden>
- Date: Thu, 21 Nov 2002 14:23:54 +0000
I think Nigel Garvey's the best man to ask about date math. (Seems to be
laying low recently; maybe he's been busy? Try searching ScriptBuilders at
macscripter.com - I know he's got at least one collection of date scripts
posted there.) There's also some useful stuff on my own site (dateLib,
calendarLib).
Anyway...
======================================================================
on daysInMonth(theDate) -- [date math a-la NG]
copy theDate to tmpDate
set tmpDate's day to 32
set tmpDate's day to 1
return day of (tmpDate - (1 * days))
end daysInMonth
on daysLeftInMonth(theDate)
return daysInMonth(theDate) - (theDate's day)
end daysLeftInMonth
daysLeftInMonth(current date)
======================================================================
HTH
has
--
http://www.barple.pwp.blueyonder.co.uk -- The Little Page of AppleScripts
_______________________________________________
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.