Re: Conversion of ISO Date String to AppleScript Date
Re: Conversion of ISO Date String to AppleScript Date
- Subject: Re: Conversion of ISO Date String to AppleScript Date
- From: Shane Stanley <email@hidden>
- Date: Sun, 05 Mar 2017 22:55:17 +1100
On 5 Mar 2017, at 5:57 pm, Jim Underwood <email@hidden> wrote:
>
> please try to shoot holes in this script.
To be picky, you talk about "ISO dates", by which you presumably mean ISO 8601 dates. And you only handle a small subset (and I think you're actually venturing outside ISO 8601 with the space instead of a T -- that's more RFC 3339), which is fine. But you're not trapping for the other possibilities.
So if you get a string like "2016-01-05T13:01:15Z", rather than erroring, you're going to return a potentially erroneous date. Perhaps you should also test for a maximum length, at least.
--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>, <latenightsw.com>
_______________________________________________
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