wschella / Sparqlee

Simple SPARQL expression evaluator library
0 stars 0 forks source link

Only accept spec compliant dates #9

Open wschella opened 6 years ago

wschella commented 6 years ago

Currently, we use JS' builtin Date parser, which is a lot less strict, and as such will accept dates that the spec would not. We should probably follow the spec here. Related to #7.

Spec: The ·lexical space· of dateTime consists of finite-length sequences of characters of the form: '-'? yyyy '-' mm '-' dd 'T' hh ':' mm ':' ss ('.' s+)? (zzzzzz)?, where

rubensworks commented 6 years ago

It might even make sense to create some kind of separate xsd-date library, that contains such a new datatype with appropriate methods. I'm sure this would this useful in other projects as well.

joachimvh commented 6 years ago

Wouldn't there already be some existing libraries for this since this is the iso 8601 standard?