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

Extend specification with non default format for types yearmonth and year #659

Open
pajachiet opened this issue Feb 5, 2020 · 2 comments

Comments

@pajachiet
Copy link

It would be very useful for us to extend the specification toaccept non default formats for type yearmonth, in the same way as date, time and datetime.

If we extend the specification for type yearmonth, it would be logical to extend it also for type year.

Our usecase is to describe a large database with tableschema, where yearmonth is writen with format YYYYMM and not default YYYY-MM.

This would allow us to validate the data, and to generate fake data with our beta library tsfaker.

@rufuspollock
Copy link
Contributor

@pajachiet this seems very sensible. A PR for the change would be welcomed.

@rjgladish
Copy link

Consider a datetime type property modifier, similar to numeric, integer and boolean, to specify a different EDTF level, e.g. EDTF-0, EDTF-1, EDTF-2
with EDTF-0 as the default, which is ISO-8601-1 (see detail below).

EDTF https://www.loc.gov/standards/datetime/
defines a robust date-time encoding syntax with multiple, escalating complexity levels.

Three conformance levels are defined: level 0, level 1, and level 2. Level 0 specifies features of ISO 8601-1; Levels 1 and 2 specify features described ISO 8601-2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

4 participants