Skip to content

Support for all ISO8601/RFC3339 formats for date & time #335

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

Closed
drwharris opened this issue Jun 20, 2017 · 3 comments
Closed

Support for all ISO8601/RFC3339 formats for date & time #335

drwharris opened this issue Jun 20, 2017 · 3 comments
Milestone

Comments

@drwharris
Copy link

Currently JSON Schema supports "format" : "date-time", however RFC3339 details a number of other possibilities.

It would be advantageous if we could specify in addition to "date-time":

"format" : "full-date"
"format" : "full-time"

@adamvoss
Copy link
Contributor

For clarification:

The title suggests supporting all RFC3339 formats while the description asks about full-date and full-time. Are you looking for all to be added or just the two?

I have used at least one of these additional formats in a JSON Schema, but then enforced it via regular expression.

@drwharris
Copy link
Author

Patterns are just a shortcut to a validation...a convenience. So yes, we could just use regex instead but patterns are convenient :) and also make it easier for people who font get regex.

As to you clarification, strive for the title but start with the description. The title would give you the ability to say your patterns comply with ISO 8601, etc but full-date and time would likely cover 80-90% of use cases.

@handrews handrews added this to the draft-07 (wright-*-02) milestone Aug 18, 2017
@handrews
Copy link
Contributor

I'm going to close this in favor of issue #199, which started out as just asking about date and time, but ended up bringing up the idea of using all of the formats as requested here.

There is more discussion in that issue, so let's continue things there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

3 participants