• 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: Dave Lyons <email@hidden>
  • Date: Thu, 3 Nov 2005 15:57:19 -0800

On Nov 3, 2005, at 9:06 AM, Chris Tangora wrote:
Hi All, I found this in the archive and wanted to know if there was an option to get the date from two days in the future. I'm trying to make script that will look ahead for what the month and day will be in numerical format. I'm using the shell script "date" to get the current date, but I want to get that same info as + 2 days.

Does anybody know how to do this? I like the terminal / shell options rather than changing the text item delimiters, sorting out, etc. But you gotta work with what you have.

I don't know how to do it with shell-script stuff like you asked, but the following works in 10.4.3:


	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.)

Cheers,

--Dave
_______________________________________________
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: Specific Date-Time Formatting
      • From: Christopher Nebel <email@hidden>
    • Re: Specific Date-Time Formatting
      • From: Michelle Steiner <email@hidden>
References: 
 >Specific Date-Time Formatting (From: Chris Tangora <email@hidden>)

  • Prev by Date: Re: changing keyboard shortcut check boxes
  • Next by Date: Re: Specific Date-Time Formatting
  • Previous by thread: Specific Date-Time Formatting
  • Next by thread: Re: Specific Date-Time Formatting
  • Index(es):
    • Date
    • Thread