You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But then in the date converter you check for the ISO date with the Z notation ? How does that match ?
date: function(x){
var isoDate = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,3}))?Z$/.exec(x);
var date;
if (isoDate) {
date = new Date(Date.UTC(+isoDate[1], +isoDate[2] - 1, +isoDate[3], +isoDate[4], +isoDate[5], +isoDate[6], +isoDate[7] || 0));
}else{
date = new Date(x);
}
if (isNaN(date.getTime())){
throw new URIError("Invalid date " + x);
}
return date;
}
Please correct that. It should be possible to pass a correct ISO date string.
In the function
stringToValue
you check for a date string. Currently you can only pass a value in thisFor example this works
2007-12-24T18:21:00+00:00
but
2007-12-24T18:21:00Z
does not
But then in the date converter you check for the ISO date with the Z notation ? How does that match ?
Please correct that. It should be possible to pass a correct ISO date string.
This is the right regex
^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:Z|[+-][01]\d:[0-5]\d)$
The text was updated successfully, but these errors were encountered: