File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1030,7 +1030,7 @@ const dateTime = (function () {
1030
1030
// Note, syntax based on https://www.w3.org/TR/xpath-functions-31/#date-time-examples
1031
1031
matcher . type = 'integer' ;
1032
1032
const isUpper = formatSpec . case === tcase . UPPER ;
1033
- const mandatoryDigits = formatSpec . mandatoryDigits && formatSpec . mandatoryDigits > 0 ? formatSpec . mandatoryDigits . toString ( ) : '+' ;
1033
+ const occurrences = formatSpec . mandatoryDigits && formatSpec . mandatoryDigits > 0 ? `{ ${ formatSpec . mandatoryDigits } }` : '+' ;
1034
1034
switch ( formatSpec . primary ) {
1035
1035
case formats . LETTERS :
1036
1036
matcher . regex = isUpper ? '[A-Z]+' : '[a-z]+' ;
@@ -1051,7 +1051,7 @@ const dateTime = (function () {
1051
1051
} ;
1052
1052
break ;
1053
1053
case formats . DECIMAL :
1054
- matcher . regex = `[0-9]{ ${ mandatoryDigits } }` ;
1054
+ matcher . regex = `[0-9]${ occurrences } ` ;
1055
1055
if ( formatSpec . ordinal ) {
1056
1056
// ordinals
1057
1057
matcher . regex += '(?:th|st|nd|rd)' ;
You can’t perform that action at this time.
0 commit comments