terary / gabby-query-protocol-lib

Gabby Query Protocol - library
0 stars 0 forks source link

Fix ISO8601 matching RegExp #29

Closed terary closed 2 years ago

terary commented 3 years ago

https://github.com/terary/gabby-query-protocol-lib/blob/44c98c7f598763bdcfff63492f499aabefa2b3a4/src/validators/isFunctions.ts#L12

Should be: /^\d{4}-[0-1][0-9]-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d((.\d{3}){0,1}Z|(\+|-)[0-2]\d:[0-5]\d)$/;

The revision accommodates for ".000Z". The current only works for dates like '1974-06-29T13:30Z'

terary commented 2 years ago

Should be fixed with branch https://github.com/terary/gabby-query-protocol-lib/tree/issue_20211113