This is not a valid syntax in JavaScript. The correct syntax to subtract a moment from the current time using the Moment.js library is:

moment().subtract(duration, 'unit');

For example, to subtract 1 day from the current time:

moment().subtract(1, 'day');

Or to subtract 2 hours from the current time:

moment().subtract(2, 'hours');
Moment.js Subtract: How to Subtract Time from a Moment

原文地址: https://www.cveoy.top/t/topic/pdvr 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录