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