How can I get the next Monday in JavaScript? I can\'t find anything of this in the internet and I have also tried a lot of codes and understanding of this but I can\'t reall
This will give next Monday if today is Monday
var d = new Date(); d.setDate(d.getDate() + (7-d.getDay())%7+1);
This will result in today if today is Monday
var d = new Date(); d.setDate(d.getDate() + ((7-d.getDay())%7+1) % 7);