shexSpec / shex

ShEx language issues, including new features for e.g. ShEx2.1
24 stars 8 forks source link

Support for date ranges #108

Open labra opened 3 years ago

labra commented 3 years ago

ShEx supports range comparisons with (Min/Max)(In/Ex)clusive but it is limited to numbers. I think it would be easy to extend it to other datatypes like dates. For example, we could express:

:User {
 :birthDate MinInclusive "2000-01-01T12:00:00"^^xsd:dateTime
}
ludwigschub commented 3 years ago

Technically this could already be achieved by specifying a min value of seconds-since-epoch or?

ericprud commented 3 years ago

Not currently, XSD numeric comparisons are only spec'd for XSD numeric types. but we could go where no RDF or XML language has gone before (afaik):

:User {
 :birthDate MinInclusive 2000-01-01T12:00:00Z
   // wd:proposed 2021-06-06T18:35:00-01:00;
 :asValueSetValue [ 1 'a' 2000-01-01T12:00:00Z ] ;
}

c.f. yacker ShEx2_dateTime example