clingen-data-model / clingen-interpretation

Allele (variant) interpretation model and API for ClinGen
3 stars 1 forks source link

Datetime type #210

Closed cbizon closed 6 years ago

cbizon commented 6 years ago

Contribution has a contributionDate attribute with type "Datetime". What is this supposed to refer to? We don't have such a type, and it's not a json type.

larrybabb commented 6 years ago

I would refer to https://stackoverflow.com/questions/10286204/the-right-json-date-format?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa for supporting datetimes. It's pretty standard practice.

Using javascript datetime approach is probably the best approach.

Is that helpful? Should we make a change in our spreadsheets or have an FAQ topic to explain how we are handling this in our messages?

cbizon commented 6 years ago

I think that's a good approach to encoding datetimes, but the question is what do we validate.

Is the specific form of the string a must or a should?

If it is a must, do we expect that to be encoded in the spreadsheet, or in the json schema, or just as a declaration?

I guess I'm thinking we should say what we expect, maybe have some documentation, but list the type in the spreadsheet & schema as just a string.

larrybabb commented 6 years ago

That sounds like a reasonable approach. Let's do that for now. Seems like anything more would take greater effort and would be too big of a reach for us at this point.

bpow commented 6 years ago

I thought the intent was to map to the json schema "date-time" format (in json schema, this is implemented as setting the type to string and the "format" to "date-time"). Validation from the json-schema standpoint would then be taken care of, and the formal specification would be according to RFC3999 section 5.6

cbizon commented 6 years ago

Cool! I had missed that. I'll go this route.

larrybabb commented 6 years ago

@cbizon can you close this?