• 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: Conversion of ISO Date String to AppleScript Date
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Conversion of ISO Date String to AppleScript Date
      • From: Jim Underwood <email@hidden>
References: 
 >Re: Conversion of ISO Date String to AppleScript Date (From: Ed Stockly <email@hidden>)
 >Re: Conversion of ISO Date String to AppleScript Date (From: Ed Stockly <email@hidden>)
 >Re: Conversion of ISO Date String to AppleScript Date (From: Ed Stockly <email@hidden>)
 >Re: Conversion of ISO Date String to AppleScript Date (From: Ed Stockly <email@hidden>)
 >Re: Conversion of ISO Date String to AppleScript Date (From: Shane Stanley <email@hidden>)
 >Re: Conversion of ISO Date String to AppleScript Date (From: Jim Underwood <email@hidden>)

  • Prev by Date: Contacts.app metadata associated with each entry
  • Next by Date: Re: Conversion of ISO Date String to AppleScript Date
  • Previous by thread: Re: Conversion of ISO Date String to AppleScript Date
  • Next by thread: Re: Conversion of ISO Date String to AppleScript Date
  • Index(es):
    • Date
    • Thread