Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
kuaifan committed Jan 6, 2022
1 parent 748976f commit 3ebc720
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions resources/assets/js/functions/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -881,11 +881,13 @@
if (params instanceof Date) {
params = $A.formatDate(format, params);
} else if ($A.isJson(params)) {
params = Object.assign({}, params)
for (let key in params) {
if (!params.hasOwnProperty(key)) continue;
params[key] = $A.date2string(params[key], format);
}
} else if ($A.isArray(params)) {
params = Object.assign([], params)
params.forEach((val, index) => {
params[index] = $A.date2string(val, format);
});
Expand Down
2 changes: 1 addition & 1 deletion resources/assets/js/pages/manage/components/TaskAdd.vue
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ export default {
const {times} = this.addData;
let temp = $A.date2string(times, "Y-m-d H:i");
if (temp[0] && temp[1]) {
let d = Math.floor(($A.Date(temp[1]).getTime() - $A.Date(temp[0]).getTime()) / 86400000);
let d = Math.ceil(($A.Date(temp[1]).getTime() - $A.Date(temp[0]).getTime()) / 86400000);
if (d > 0) {
return d;
}
Expand Down

0 comments on commit 3ebc720

Please sign in to comment.