Commit 7ec82cbc authored by BaiJiangJie's avatar BaiJiangJie

[Update] 修改列表日期2

parent 63c2343d
...@@ -1091,7 +1091,7 @@ function objectAttrsIsList(obj, attrs) { ...@@ -1091,7 +1091,7 @@ function objectAttrsIsList(obj, attrs) {
function objectAttrsIsDatetime(obj, attrs) { function objectAttrsIsDatetime(obj, attrs) {
attrs.forEach(function (attr) { attrs.forEach(function (attr) {
obj[attr] = new Date(obj[attr]).toISOString(); obj[attr] = formatDateAsCN(obj[attr]);
}) })
} }
...@@ -1156,10 +1156,8 @@ function getTimeUnits(u) { ...@@ -1156,10 +1156,8 @@ function getTimeUnits(u) {
} }
function timeOffset(a, b) { function timeOffset(a, b) {
a = cleanDate(a); var start = safeDate(a);
b = cleanDate(b); var end = safeDate(b);
var start = new Date(a);
var end = new Date(b);
var offset = (end - start)/1000; var offset = (end - start)/1000;
var days = offset / 3600 / 24; var days = offset / 3600 / 24;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment