Browse Source

Pull request #3288: REPORT-85533 fix: BI.parseDateTime方法对%l:%M:%S %P这种格式的日期如果带有秒数解析出错

Merge in VISUAL/fineui from ~DAILER/fineui:master to master

* commit '170b61c9758615c192b8cad23cc9021604a891de':
  REPORT-85533 fix: BI.parseDateTime方法对%l:%M:%S %P这种格式的日期如果带有秒数解析出错
master
Dailer-刘荣歆 2 years ago
parent
commit
1967a92a53
  1. 13
      src/core/2.base.js

13
src/core/2.base.js

@ -1037,11 +1037,18 @@
return MM >= 1 && MM <= 12 && DD <= MD[MM - 1];
},
/**
*
* @param str
* @param fmt
* @returns {Date|Date}
* 年月日缺省值为当前日期, 时分秒缺省值为0
*/
parseDateTime: function (str, fmt) {
var today = BI.getDate();
var y = 0;
var m = 0;
var d = 1;
var y;
var m;
var d;
// wei : 对于fmt为‘YYYYMM’或者‘YYYYMMdd’的格式,str的值为类似'201111'的形式,因为年月之间没有分隔符,所以正则表达式分割无效,导致bug7376。
var a = str.split(/\W+/);
if (fmt.toLowerCase() == "%y%x" || fmt.toLowerCase() == "%y%x%d") {

Loading…
Cancel
Save