let x = 2703750;//单位是秒
var d = moment.duration(x, 'seconds');
console.log(Math.floor(d.asDays()) + '天' + d.hours() + '时' + d.minutes() + '分' + d.seconds() + '秒');

输出结果为31天7时2分30秒

最大单位到天

相关文章: