Appearance
返回减去一定时间的复制的时长对象。
var a = dayjs.duration(3, "d"); var b = dayjs.duration(2, "d"); a.subtract(b).days(); // 1 a.subtract({ days: 2 }).days(); a.subtract(2, "days");
days
d
weeks
w
months
M
years
y
hours
h
minutes
m
seconds
s
milliseconds
ms