Using Moment.js to find a specific day of the current week’s date

this week’s sunday

moment().startOf('week')

this week’s monday

moment().startOf('isoweek')

this week’s saturday

moment().endOf('week')

difference between the current day to sunday

moment().diff(moment().startOf('week'),'days')

this week’s wedesday

moment().startOf('week').add('days', 3)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)