Open wschella opened 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.
Wouldn't there already be some existing libraries for this since this is the iso 8601 standard?
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