Re: Lists to XML ?
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/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