Re: Specific Date-Time Formatting
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