• 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: Specific Date-Time Formatting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Specific Date-Time Formatting


  • Subject: Re: Specific Date-Time Formatting
  • From: "Nigel Garvey" <email@hidden>
  • Date: Fri, 4 Nov 2005 14:16:31 +0000

Dave Lyons wrote on Thu, 3 Nov 2005 15:57:19 -0800:

>	set dayAfterTomorrow to (current date) + (60 * 60 * 24 * 2)
>	set m to month of dayAfterTomorrow as integer
>	set d to day of dayAfterTomorrow
>
>(I remember reading that the "month of <date>" ability is new in
>Tiger, so this may not help you if you need to work on 10.3 or earlier.)

Month-to-integer coercions were introduced with 10.3. On earlier systems,
a couple of extra lines would be needed.

  set dayAfterTomorrow to (current date) + 2 * days
  copy dayAfterTomorrow to b
  set b's month to January
  set m to (b - 2500000 - dayAfterTomorrow) div -2500000
  set d to day of dayAfterTomorrow

NG

 _______________________________________________
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

  • Prev by Date: Re: How to work with XML data using System Events?
  • Next by Date: Extract from result of current date
  • Previous by thread: Re: Specific Date-Time Formatting
  • Next by thread: RE: Script Timer/Filemaker question
  • Index(es):
    • Date
    • Thread