Re: date/Snow Leopard changed
Re: date/Snow Leopard changed
- Subject: Re: date/Snow Leopard changed
- From: Michelle Steiner <email@hidden>
- Date: Wed, 2 Sep 2009 11:39:47 -0700
On Sep 2, 2009, at 10:39 AM, has wrote: In any case, you shouldn't need to use string mashing to obtain a date at a particular time. Haven't tried it in 10.6 yet, but here is the traditional way of doing it:
date "6:01" of (current date)
That doesn't work under 10.6, but this does:
set nowTime to date string of (current date) set WakeUpTime to " 6:01 am" --note leading space; it is required to separate the date from the time. set SleepTime to " 9:01 pm" -- "am" and/or "pm" are mandatory if the system is set to display 12-hour time format.
set WakeUpTime to date (nowTime & WakeUpTime) set bedTime to date (nowTime & SleepTime) {WakeUpTime, bedTime}
--> {date "Wednesday, September 2, 2009 6:01:00 AM", date "Wednesday, September 2, 2009 9:01:00 PM"}
-- Michelle
-- Approximately 20% of workday absences occur on Tuesdays.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden