0

I get the second week of 2018 like this using moment.js

 var date =moment([2018]).isoWeek(2).startOf('isoWeek').format('DD-MM-YYYY');

I need to get the date previous to the this date; i.e. the date previous to 08-01-2018

Rohan Kumar
  • 181
  • 1
  • 2
  • 16
  • 1
    Please search before asking. You can literally Google your question title to find the answer. – str Jan 03 '19 at 10:00

1 Answers1

1

Use moment substract method:

.subtract(1, 'days');
quirimmo
  • 9,800
  • 3
  • 30
  • 45