Skip to content
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

New types #113

Open
anewton1998 opened this issue Jan 12, 2018 · 2 comments
Open

New types #113

anewton1998 opened this issue Jan 12, 2018 · 2 comments

Comments

@anewton1998
Copy link
Contributor

This is a proposal for new types.

While any is great, a set of narrower types might be useful:

  • anyobject
  • anyarray
  • anyprimitive

Also, the data and time types are based on RFC 3339, which is itself based on ISO 8601. It would be useful to have some ISO 8601 types since most implemenations will use ISO 8601 to do RFC 3339 validation:

  • iso8601date
  • iso8601time
  • iso8601datetime
@codalogic
Copy link
Contributor

I'm good with the any* types.

But I'm not seeing that we need the iso8601* types. As you say, RFC 3339 is a subset of ISO 8601, and I believe - for good reason. Having pure, unconstrained ISO 8601 types could open a whole can of worms.

My feeling is that we should limit the times to the RFC 3339 subset, (as we have now), and if someone wants to use a full ISO 8601 engine to manipulate that subset, then that's an implementation detail for them.

Or have I misunderstood?

@codalogic
Copy link
Contributor

For information, XML Schema (part 2 https://www.w3.org/TR/xmlschema11-2/#date ) is essentially RFC 3339, but allows more than 4 digits of year, and negative years. That maybe helpful for publishing etc., but not sure it helps with IETF type things.

But if you want some JSON to describe, say, the periods covered by history books, including the ancient Egyptians, the going beyond RFC 3339 could be useful.

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

No branches or pull requests

2 participants