• 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
Fwd: Date computation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: Date computation


  • Subject: Fwd: Date computation
  • From: yvan-koenig <email@hidden>
  • Date: Fri, 7 Jan 2005 18:52:33 +0100



Hello

It seems that Michelle forgot a detail:

property monthList : {January, February, March, April, May, June, July, ¬
August, September, October, November, December}
to getNextMonth from the d
set cMonth to( month of d) as number -- HERE
	if cMonth  is 12 then
		set year of d to (year of d) + 1
		set month of d to January
	else
		set month of d to (item (cMonth + 1) of the monthList)
	end if
return d
end getNextMonth

It seems that we may get rid of the property:

to getNextMonth from the d
set cMonth to (month of d) as number
if cMonth is 12 then
set year of d to (year of d) + 1
set month of d to January
else
set d to date ("" & (day of d) & "/" & (cMonth + 1) & "/" & (year of d))
end if
return d
end getNextMonth


Yvan KOENIG


_______________________________________________ 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
  • Follow-Ups:
    • Re: Date computation
      • From: Michelle Steiner <email@hidden>
  • Prev by Date: Re: Finding the hidden characters in Quark via AppleScript
  • Next by Date: Re: Date computation
  • Previous by thread: Re: Date computation
  • Next by thread: Re: Date computation
  • Index(es):
    • Date
    • Thread