• 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: Nigel Garvey <email@hidden>
  • Date: Thu, 21 Nov 2002 18:32:24 +0000

has wrote on 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?

Lying low, uninspired by current discussions, still using Mac OSes 8.6
and 9.2, busy musically, etc.... But thanks for the plug. :-)

>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

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

NG
_______________________________________________
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.

  • Follow-Ups:
    • Re: Number of days left in the month
      • From: Emmanuel <email@hidden>
  • Prev by Date: Re: AppleScript 1.6 and Mac OS 8.6 - SOLVED
  • Next by Date: to copy a text doc from 1 prog and paste in quark
  • 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