• 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: Lists to XML ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lists to XML ?


  • Subject: Re: Lists to XML ?
  • From: Jean-Christophe Helary <email@hidden>
  • Date: Tue, 28 Mar 2017 10:26:48 +0900


On Mar 25, 2017, at 10:45, Shane Stanley <email@hidden> wrote:

3) The creation of an ISO8601 time string, since there is no way to access "hour" "minute" and "second" from "date", but I seem to remember that has been discussed here in the past so I'm not worried.

If running 10.12, this is shorter:

set theDate to current application's NSDate's |date|()
set dateString to (current application's NSISO8601DateFormatter's stringFromDate:theDate timeZone:(current application's NSTimeZone's timeZoneWithAbbreviation:"GMT") formatOptions:1907) as text -- 1907 is magic number for RFC3339

Shane,

I'm not finding any reference to that 1907 number in the API reference:
https://developer.apple.com/reference/foundation/nsiso8601dateformatter/1643324-formatoptions

https://developer.apple.com/reference/foundation/nsiso8601dateformatoptions?language=objc

Where do you find it ? :-)
Is there a list of such codes somewhere ?

The "recommended" pattern for TMX is YYYYMMDDThh:mm:ssZ , which does not mean that the output of the code is invalid (in my understanding), but I've seen at least one validator that did not accept it.

Jean-Christophe
 _______________________________________________
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: Lists to XML ?
      • From: Shane Stanley <email@hidden>
References: 
 >Lists to XML ? (From: Jean-Christophe Helary <email@hidden>)
 >Re: Lists to XML ? (From: Shane Stanley <email@hidden>)
 >Re: Lists to XML ? (From: Jean-Christophe Helary <email@hidden>)
 >Re: Lists to XML ? (From: Steve Mills <email@hidden>)
 >Re: Lists to XML ? (From: Jean-Christophe Helary <email@hidden>)
 >Re: Lists to XML ? (From: Jean-Christophe Helary <email@hidden>)
 >Re: Lists to XML ? (From: Shane Stanley <email@hidden>)
 >Re: Lists to XML ? (From: Jean-Christophe Helary <email@hidden>)
 >Re: Lists to XML ? (From: Shane Stanley <email@hidden>)

  • Prev by Date: interactive osascript acting strangely
  • Next by Date: Re: Lists to XML ?
  • Previous by thread: Re: Lists to XML ?
  • Next by thread: Re: Lists to XML ?
  • Index(es):
    • Date
    • Thread