Re: Coping with Date format variations
Re: Coping with Date format variations
- Subject: Re: Coping with Date format variations
- From: "Mark J. Reed" <email@hidden>
- Date: Mon, 24 May 2010 20:13:44 -0400
On Mon, May 24, 2010 at 7:59 PM, Robert Poland
<email@hidden> wrote:
Hi,
On a somewhat related subject;
Is there a simple command that will do this (convert WakeUpTime to an integer), and probably quicker?
Your code seems like a reasonable approach, except it's bad encapsulation to have the setting and resetting of the TIDs outside the decoupe() handler; it requires the calling code to know how the handler works, which is fragile. If you're going to be calling it a lot, then it may be a necessary evil for performance, but I would still hide the details from the caller, maybe by having a "prepare()" and "finish()" handler.
As an alternative, depending on your locale settings, you may be able to use some variation on this:
time of (date ((date string of (current date)) & " " & t & " AM"))
(This takes advantage of the fact that 24-hour times work with "AM", at least OMM).
--
Mark J. Reed <
email@hidden>
_______________________________________________
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