Commit cfbd11de by 姜雷

计算天数向下取整大于1小时多计算一天

parent a06fde71
......@@ -88,11 +88,19 @@ export default {
},
computed: {
day() {
let sed = Math.ceil(
let sub =
(new Date(this.selected.endDate).getTime() / 1000 / 60 / 60 -
new Date(this.selected.beginDate).getTime() / 1000 / 60 / 60) %
24 >
1
? 1
: 0;
let sed =
Math.floor(
(new Date(this.selected.endDate).getTime() / 1000 / 60 / 60 -
new Date(this.selected.beginDate).getTime() / 1000 / 60 / 60) /
24
);
) + sub;
return sed;
},
......
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