Skip to content

Support date and time, and allow for more RFC 3339 #399

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 22, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 40 additions & 6 deletions jsonschema-validation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -799,14 +799,48 @@

<section title="Defined formats">

<section title="date-time">
<t>
This attribute applies to string instances.
<section title="Dates and times">
<t>
These attributes apply to string instances.
</t>
<t>
Date and time format names are derived from
<xref target="RFC3339">RFC 3339, section 5.6</xref>.
</t>
<t>
Implementations supporting formats SHOULD implement support for
the following attributes:
<list style="hanging">
<t hangText="date-time">
A string instance is valid against this attribute if it is
a valid representation according to the "date-time" production.
</t>
<t hangText="date">
A string instance is valid against this attribute if it is
a valid representation according to the "full-date" production.
</t>
<t hangText="time">
A string instance is valid against this attribute if it is
a valid representation according to the "full-time" production.
</t>
</list>
</t>
<t>
A string instance is valid against this attribute if it is a valid date
representation as defined by <xref target="RFC3339">RFC 3339, section
5.6</xref>.
Implementations MAY support additional attributes using the other
production names defined in that section. If "full-date" or "full-time"
are implemented, the corresponding short form ("date" or "time"
respectively) MUST be implemented, and MUST behave identically.
Implementations SHOULD NOT define extension attributes
with any name matching an RFC 3339 production unless it validates
according to the rules of that production.
<cref>
There is not currently consensus on the need for supporting
all RFC 3339 formats, so this approach of reserving the
namespace will encourage experimentation without committing
to the entire set. Either the format implementation requirements
will become more flexible in general, or these will likely
either be promoted to fully specified attributes or dropped.
</cref>
</t>
</section>

Expand Down