• 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: date/Snow Leopard changed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: date/Snow Leopard changed
      • From: LuKreme <email@hidden>
    • Re: date/Snow Leopard changed
      • From: Yvan KOENIG <email@hidden>
References: 
 >Re: date/Snow Leopard changed (From: has <email@hidden>)

  • Prev by Date: Script to mail contents of safari web page.
  • Next by Date: Rép: date/Snow Leopard changed
  • Previous by thread: Re: date/Snow Leopard changed
  • Next by thread: Re: date/Snow Leopard changed
  • Index(es):
    • Date
    • Thread