• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Number of days left in the month
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Last day of month....
  • Next by Date: Re: Hex colors in Tex-Edit X
  • Previous by thread: Re: Number of days left in the month
  • Next by thread: Re: Number of days left in the month
  • Index(es):
    • Date
    • Thread