react antD moment

import moment from 'moment'
The day before console.log (moment (). Add (1, 'days'). Format ( 'YYYY-MM-DD')) // current time
console.log (moment (). add (-1, 'week'). format ( 'YYYY-MM-DD')) // week before the current time
console.log (moment (). add (1, 'week'). format ( 'YYYY-MM-DD')) // week after the current time

Guess you like

Origin www.cnblogs.com/whlBooK/p/11040946.html