Commit 2414c036 authored by l2m2's avatar l2m2

upload.

parent b1d5e952
......@@ -25,10 +25,14 @@ var moment = require("moment");
// print(duration1, duration2, result);
// 求时间的差值
var start_time = "2019-07-08 23:45:09";
var end_time = "2019-07-09 00:00:00";
var result = moment(end_time).diff(moment(start_time), 's');
print(result);
var start_time = "2019-03-31";
var end_time = "2019-06-30";
print(moment.VERSION);
print(moment('2020-02-01').add(1, 'months'));
print(moment(start_time).add(3, 'months'));
print(moment(end_time).diff(moment(start_time), 'months', true));
print(moment(start_time).add(3, 'months').diff(moment(start_time), 'months'));
print(moment(start_time).add(90, 'days').diff(moment(start_time), 'days'));
// 取整点
// var start_time = "2019-07-08 23:45:09";
......
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