Re: date syntax not working on 10.10.5?
Re: date syntax not working on 10.10.5?
- Subject: Re: date syntax not working on 10.10.5?
- From: Christopher Stone <email@hidden>
- Date: Fri, 14 Aug 2015 18:18:34 -0500
On Aug 14, 2015, at 15:21, Bruce Robertson < email@hidden> wrote: What is the expected result of this example? My result is: date "Friday, August 14, 2015 at 12:00:00 AM"
______________________________________________________________________
On what OSX?
That appears to be string-to-date conversion wonkiness and can be related to several factors.
What happens when you use this more straightforward handler?
dateFromTimeStr("10:15")
--> date "Friday, August 14, 2015 at 10:15:00 CDT"
on dateFromTimeStr(timeStr) set _date to current date set time of _date to 0 set {oldTIDS, AppleScript's text item delimiters} to {AppleScript's text item delimiters, ":"} tell timeStr to set _date to _date + ((text item 1) * hours) + ((text item 2) * minutes) set AppleScript's text item delimiters to oldTIDS return _date end dateFromTimeStr
-- Best Regards, Chris ______________________________________________________________ MacBookPro6,1 · 2.66 GHz Intel Core i7 · 8GB RAM · OSX 10.10.5
|
_______________________________________________
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