Re: Specific Date-Time Formatting
Re: Specific Date-Time Formatting
- Subject: Re: Specific Date-Time Formatting
- From: Michelle Steiner <email@hidden>
- Date: Thu, 3 Nov 2005 17:17:43 -0700
On Nov 3, 2005, at 4:57 PM, Dave Lyons 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
why not this:
set dayAfterTomorrow to (current date) + 2 * days
set {m, d} to {month, day} of dayAfterTomorrow
Applescript has built-in values of minutes, hours, days, and weeks;
how come so few people use them, but rather use the explicit numbers
that these values represent?
--
The invasion of Iraq is "a catastrophic success"
-- G.W. Bush, August 29, 2004
_______________________________________________
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