• 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: Paul Skinner <email@hidden>
  • Date: Thu, 21 Nov 2002 17:04:25 -0500

On Thursday, November 21, 2002, at 04:44 PM, Emmanuel wrote:

At 6:32 PM +0000 21/11/02, Nigel Garvey wrote:

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

or even into:

on daysInMonth(theDate)
set theDate's day to 32
return 32 - (theDate's day)
end daysInMonth

Emmanuel

i thought so too, but it ruins the input date...

set x to current date -- Nov 21 2002
daysInMonth(x)
x-->date "Monday, December 2, 2002 5:02:14 PM"

on daysInMonth(theDate)
set theDate's day to 32
return 32 - (theDate's day)
end daysInMonth


--
Paul Skinner
_______________________________________________
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>
References: 
 >Re: Number of days left in the month (From: Emmanuel <email@hidden>)

  • Prev by Date: Re: String parsing - help!
  • Next by Date: Re: Number of days left in the month
  • 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