Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js get the week monday to friday date

var currentDate = new Date();
var firstday = new Date(currentDate.setDate(currentDate.getDate() - currentDate.getDay())).toUTCString();
var lastday = new Date(currentDate.setDate(currentDate.getDate() - currentDate.getDay() + 7)).toUTCString();
console.log(firstday, lastday)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #week #monday #friday #date
ADD COMMENT
Topic
Name
5+4 =