File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -983,6 +983,7 @@ const dateTime = (function () {
983
983
return offsetHours * 60 + offsetMinutes ;
984
984
} ;
985
985
} else if ( part . integerFormat ) {
986
+ part . integerFormat . n = part . n ;
986
987
res = generateRegex ( part . integerFormat ) ;
987
988
} else {
988
989
// must be a month or day name
@@ -1030,7 +1031,11 @@ const dateTime = (function () {
1030
1031
// Note, syntax based on https://www.w3.org/TR/xpath-functions-31/#date-time-examples
1031
1032
matcher . type = 'integer' ;
1032
1033
const isUpper = formatSpec . case === tcase . UPPER ;
1033
- const occurrences = formatSpec . mandatoryDigits && formatSpec . mandatoryDigits > 0 ? `{${ formatSpec . mandatoryDigits } }` : '+' ;
1034
+ // const mandatoryDigits = formatSpec.mandatoryDigits && formatSpec.mandatoryDigits > 0 ? formatSpec.mandatoryDigits : 0;
1035
+ // const optionalDigits = formatSpec.optionalDigits && formatSpec.optionalDigits > 0 ? formatSpec.optionalDigits : 0;
1036
+ // const totalDigits = mandatoryDigits + optionalDigits;
1037
+ // eslint-disable-next-line no-unused-vars
1038
+ const occurrences = formatSpec . n && formatSpec . n > 1 ? `{${ formatSpec . n } }` : '+' ;
1034
1039
switch ( formatSpec . primary ) {
1035
1040
case formats . LETTERS :
1036
1041
matcher . regex = isUpper ? '[A-Z]+' : '[a-z]+' ;
You can’t perform that action at this time.
0 commit comments