Validation errors with the date-time format

Issue #5 resolved
Kevin Godby
created an issue

The date-time format should follow RFC 3339 which allows the optional use of fraction seconds and numeric time-zone offsets. The regex currently used in src/ (lines 524–525) doesn't account for this, however.

The following date-times should be valid (and were copied from examples in RFC 3339):

1985-04-12T23:20:50.52Z - fails - fractional seconds
1996-12-19T16:39:57-08:00 - fails - time-zone offset

The regex is also too permissive in that it validates invalid dates:

2990-15-35T99:99:99Z - erroneously passes validation

Comments (2)

  1. Log in to comment