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
To represent years before [0000] or after [9999], the standard also permits the expansion of the year representation but only by prior agreement between the sender and the receiver.
An expanded year representation [±YYYYY] must have an agreed-upon number of extra year digits beyond the four-digit minimum, and it must be prefixed with a + or − sign instead of the more common AD/BC (or CE/BCE) notation; by convention 1 BC is labelled +0000, 2 BC is labeled −0001, and so on.
And this, IMHO, should rather be something that should be done as an option, because the more common use case will be to deal with those 4 digit years - and if the RegEx is changed to also - by default - allow 4 and more digits - this will break a few validations, that depend on this.
validator.js/src/lib/isISO8601.js
Line 5 in f074abd
We have a code that would use maximum date possible in JS
Those would be converted to the following from
toISOString()
functionHowever, when using isISO8601 validator, they're invalid because the year has more than 4 digits.
Would it be possible to fix the validator to allow year with more than 4 digits?
The text was updated successfully, but these errors were encountered: