Browse Source

Pull request #204622: REPORT-83685 fix: BI.parseDateTime方法对%l:%M:%S %p这种格式的日期解析出错(后面带%p 这种的都是同类型的报错)

Merge in DEC/fineui from ~KITETOP/fineui:release/11.0 to release/11.0

* commit '5368bef358b2f0c757e4662830f9dee67a0cc55e':
  REPORT-83685 fix: BI.parseDateTime方法对%l:%M:%S %p这种格式的日期解析出错(后面带%p 这种的都是同类型的报错)
  REPORT-83685 fix: BI.parseDateTime方法对%l:%M:%S %p这种格式的日期解析出错(后面带%p 这种的都是同类型的报错)
research/test
Kitetop-谢诗桢 2 years ago
parent
commit
545982869f
  1. 4
      src/core/2.base.js
  2. 2
      src/core/func/alias.js

4
src/core/2.base.js

@ -1079,7 +1079,7 @@
case "%b": case "%b":
case "%B": case "%B":
for (j = 0; j < 12; ++j) { for (j = 0; j < 12; ++j) {
if (BI.Date._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { if (BI.getMonthName(j).substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) {
m = j; m = j;
break; break;
} }
@ -1144,7 +1144,7 @@
if (a[i].search(/[a-zA-Z]+/) != -1) { if (a[i].search(/[a-zA-Z]+/) != -1) {
var t = -1; var t = -1;
for (j = 0; j < 12; ++j) { for (j = 0; j < 12; ++j) {
if (BI.Date._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { if (BI.getMonthName(j).substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) {
t = j; t = j;
break; break;
} }

2
src/core/func/alias.js

@ -815,7 +815,7 @@
break; break;
case "M": // 月 case "M": // 月
if (len > 2) { if (len > 2) {
str = BI.Date._MN[date.getMonth()]; str = BI.getMonthName(date.getMonth());
} else if (len < 2) { } else if (len < 2) {
str = date.getMonth() + 1; str = date.getMonth() + 1;
} else { } else {

Loading…
Cancel
Save