• 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: Jim Underwood <email@hidden>
  • Date: Mon, 06 Mar 2017 03:08:38 +0000
  • Thread-topic: Conversion of ISO Date String to AppleScript Date

Shane!  That is totally awesome!  👍

Thank you so much for researching and finding a great solution for all of us!
And for going to the next level by creating the compiled framework!!!

I just downloaded your framework and script, and of course it works great!
It handles all those formats, and converts the time to your local time zone.
Couldn't ask for more.


Best Regards,

Jim Underwood
aka JMichaelTX


From: Shane Stanley <email@hidden>
Date: Sun, Mar 5, 2017 at 8:21 PM
To: "ASUL (AppleScript)" <email@hidden>
Subject: Re: Conversion of ISO Date String to AppleScript Date

But there's a third-party open-source alternative that fits the bill nicely. You can read about it and download it here: <https://github.com/boredzo/iso-8601-date-formatter>. It handles most formats, including week date and ordinal date formats. That download is not going to be much use to most scripters, but essentially it can compile into a framework that can be called from AppleScript. I've compiled the framework, and you can download it here: <https://www.macosxautomation.com/applescript/apps/ISO8601_framework.zip>.

Once you add it to your system, either in ~/Library/Frameworks or within a library or other script bundle, calling it is simple. You can make it run in a strict mode, or the default of more lenient parsing, where it handles different delimiters and things like leading spaces. Here's an example script:
 _______________________________________________
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

References: 
 >Re: Conversion of ISO Date String to AppleScript Date (From: has <email@hidden>)
 >Re: Conversion of ISO Date String to AppleScript Date (From: "Stockly, Ed" <email@hidden>)
 >Re: Conversion of ISO Date String to AppleScript Date (From: has <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>)
 >Re: Conversion of ISO Date String to AppleScript Date (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: Conversion of ISO Date String to AppleScript Date
  • Next by Date: Re: Scripting Better Applescript support requests !
  • 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