• 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: has <email@hidden>
  • Date: Wed, 2 Sep 2009 18:39:51 +0100

Robert Poland wrote:

Going through my scripts in Snow Leopard I ran into one that is being
stubborn;

set WakeUpTime to "6:01"
set SleepTime to "21:01"
set nowTime to (current date)
set wakeTime to date (date string of nowTime & ":" & WakeUpTime) --
NOTE use of ":"
set bedTime to date (date string of nowTime & ":" & SleepTime) -- NOTE
use of ": "

As indicated in the 10.6 release notes, date specifiers have become much more strict about how date strings are formatted. (The flip-side is that their internationalisation support is greatly improved.)


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)

HTH

has
--
Control AppleScriptable applications from Python, Ruby and ObjC:
http://appscript.sourceforge.net

_______________________________________________
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: Robert Poland <email@hidden>
    • Re: date/Snow Leopard changed
      • From: Michelle Steiner <email@hidden>
  • Prev by Date: KeyboardViewerServer
  • Next by Date: Script to mail contents of safari web page.
  • Previous by thread: Re: date/Snow Leopard changed
  • Next by thread: Re: date/Snow Leopard changed
  • Index(es):
    • Date
    • Thread