1
0

fix loopRule parse error

This commit is contained in:
2021-04-16 19:08:56 +08:00
parent bf441a6891
commit a9d06af3ae

View File

@@ -287,22 +287,22 @@ function ccn_datetime_ResolveLoopRules4Text(strl, startDateTime, timezoneOffset)
datetimeInstance.getUTCFullYear(), datetimeInstance.getUTCFullYear(),
datetimeInstance.getUTCMonth() + 1, datetimeInstance.getUTCMonth() + 1,
datetimeInstance.getUTCDate()); datetimeInstance.getUTCDate());
switch(loopMethod) { switch(RegExp.$2) {
case 'A': case 'A':
loopRules = $.i18n.prop('ccn-i18n-datetime-loopRuleText-monthA') loopRules = $.i18n.prop('ccn-i18n-datetime-loopRuleText-monthA')
format(parseInt(RegExp.$3), dayInMonth[0]); .format(parseInt(RegExp.$3), dayInMonth[0]);
break; break;
case 'B': case 'B':
loopRules = $.i18n.prop('ccn-i18n-datetime-loopRuleText-monthB') loopRules = $.i18n.prop('ccn-i18n-datetime-loopRuleText-monthB')
format(parseInt(RegExp.$3), dayInMonth[1]); .format(parseInt(RegExp.$3), dayInMonth[1]);
break; break;
case 'C': case 'C':
loopRules = $.i18n.prop('ccn-i18n-datetime-loopRuleText-monthC') loopRules = $.i18n.prop('ccn-i18n-datetime-loopRuleText-monthC')
format(parseInt(RegExp.$3), dayInMonth[2], dayInMonth[3]); .format(parseInt(RegExp.$3), dayInMonth[2], dayInMonth[3]);
break; break;
case 'D': case 'D':
loopRules = $.i18n.prop('ccn-i18n-datetime-loopRuleText-monthD') loopRules = $.i18n.prop('ccn-i18n-datetime-loopRuleText-monthD')
format(parseInt(RegExp.$3), dayInMonth[4], dayInMonth[5]); .format(parseInt(RegExp.$3), dayInMonth[4], dayInMonth[5]);
break; break;
} }
} else if (ccn_datetime_precompiledLoopRules.week.test(sp[0])) { } else if (ccn_datetime_precompiledLoopRules.week.test(sp[0])) {