[
https://issues.apache.org/jira/browse/SLING-7185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16203851#comment-16203851
]
Jason E Bailey commented on SLING-7185:
---------------------------------------
I found the formatting for the date to be odd and specific since Sling is
specifically looking for a specific date format in a US locale formatting. Then
it was brought to my attention that Sling is exporting the date field in this
format as well.
So my assumptions at this point is that the main focus of JSON output was to
create JSON specifically for browsers and at *that* point in time the
formatting of dates in javascript was the US focused format currently being
used by Sling
Notes:
* JavaScript has supported an ISO8601 subset since EcmaScript 5.1
* In JavaScript the default implementation of Date.toJSON() is an ISO8601
string. see
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toJSON
* ISO8601 is the standard for String representations of dates. see
https://xkcd.com/1179/
Would there be support in adding this to the Content Parser?
> Content Parser: Support for ISO-8601
> ------------------------------------
>
> Key: SLING-7185
> URL: https://issues.apache.org/jira/browse/SLING-7185
> Project: Sling
> Issue Type: Improvement
> Reporter: Jason E Bailey
> Priority: Minor
>
> The class org.apache.sling.jcr.contentparser.impl.ParserHelper defines the
> Json format for a date to a defined value of ECMA_DATE_FORMAT.
> Please support ISO-8601 as a date format.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)