Add a field-based constraint for timestamps #46
Labels
enhancement
New feature or enhancement for the Ion Schema _specification_
requires new version
Something that should be considered for next version of the Ion Schema Specification
Currently, you can create a constraint on the
n
lowest precision fields by restricting a timestamp with a range (ie. usingvalid_values
), and you can restrict then
highest precision fields to be 0 by placing a restriction on the timestamp precision. However, you cannot constrain an arbitrary field within a timestamp without placing a constraint on any of it's "neighboring" fields (eg. you can't constrain days without also constraining either months or hours) nor can you constrain a high-precision field to be something other than 0. It would be useful to be able to define constraints on specific fields within a timestamp.Example use cases:
The text was updated successfully, but these errors were encountered: