Closed cvarjao closed 1 year ago
ISO 8601 defines exactly what formats ("format tokens") are allowed, please check the examples here: https://en.wikipedia.org/wiki/ISO_8601 or official standard document.
If this does not answer your concern feel free to reopen that issue.
@mitfik , I don't think think I've got an answer to my question. Perhaps I will give a bit more background. In AnonCreds, date are provided as YYYYMMDD
(also ISO8601 compliant) as opposed to the most common ISO8601 format YYYY-MM-DD
.
The spec says
A Format Overlay defines an input and display format for data fields.
I think there are 2 distinctive concerns:
The spec provides the following for the Unix epoch:
Data type: DateTime
Character encoding: UTF-8 (default)
Standard: ISO 8601
Format: YYYY-MM-DDThh:mm:ssZ
If we want to represent AnonCreds DateInt Format, is that correct?
Data type: DateTime
Character encoding: UTF-8 (default)
Standard: ISO 8601
Format: YYYYMMDD
Thanks for follow up.
Not sure if that was your intention but you raised interesting problem what if capture format is different from display format?
Format Overlay was not meant to be used for "display" purposes specifically (display I mean what human would see), yes the spec says that it is for capture and display
but in a sense that how you capture it you always display it the same way is not localize for the user.
If I understood correctly your problem, you can define your format overlay as you like means you can operate under YYYMMDD
using as well ISO8601 as a standard or just ditch standard and go with own format, there is no problem with that. Is up to the user which format he wants use.
I would later on follow up on the topic of the localization of the format overlay. Need to think it through. You can join as well our community chat on matrix to follow up on that discussion if needed. If above won't answer you main question feel free to provide some more examples and elaborate a bit on the problem. I understood it in a way that you are asking what format tokens you can use, the answer is ALL is up to the create of the schema to decide.
In answer to the AnonCreds DateTime format, the following is correct:
Data type: DateTime Character encoding: UTF-8 Standard: ISO 8601 Format: YYYYMMDD
The current format overlay doesn't defined the supported format for displaying date, it currently defines as
What are the accepted output/display format tokens?
YYYY
,MM
,MMM
,MMMM
,DD
, etc. Should it also support any localized output format such as the one defined in Javascript/ES6: "full", "long", "medium", "short"