How to get date using momentjs?
today moment().format('YYYY-MM-DD'); Easiest method to get last 7th day moment().subtract(7, 'days').startOf('day').format('YYYY-MM-DD HH:mm:ss') Moment JS - how to subtract 7 days from current date? Moment JS - how to subtract 7 days from current date? I would like to subtract 7 days from current date to get formatted date YYYY-MM-DD using moment.js library. I tried to do by this way: dateTo = ..
Code Snippets/Javascript
2021. 12. 9. 08:02