Answers for "get last monday day of current month javascript"

5

get last day of month javascript

var today = new Date();
var lastDayOfMonth = new Date(today.getFullYear(), today.getMonth()+1, 0);
Posted by: Guest on February-12-2021
2

javascript get date of last monday

let prevMonday = new Date();
prevMonday = new Date(prevMonday.setDate(prevMonday.getDate() - (prevMonday.getDay() + 6) % 7));
// sets the date object to last Monday, if the current day is Monday,
// set it to the current date

prevMonday = new Date(prevMonday.setHours(0,0,0)); // sets hours, mins, secs to 0
Posted by: Guest on March-08-2021

Code answers related to "get last monday day of current month javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language