fix regex issue not matching correctly
This commit is contained in:
parent
5d92cd4f7f
commit
08037d7846
@ -30,7 +30,7 @@ function genHexString(len=6) {
|
||||
// region DateTime
|
||||
|
||||
function isISODateTimeString(value) {
|
||||
const isoDatePattern = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+([+-]\d{2}:\d{2}|Z)$/;
|
||||
const isoDatePattern = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?([+-]\d{2}:\d{2}|Z)$/;
|
||||
return typeof value === 'string' && isoDatePattern.test(value);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user