title: get current week moday javascript
body: <p>i want to get current week 'Monday'  based on today's time,  samples are:</p>
  
  <p>21-11-2017 output should be 20-11-2017</p>
  
  <p>23-11-2017 output should be 20-11-2017</p>
  
  <p>26-11-2017 output should be 20-11-2017</p>
  
  <pre><code>var d = new Date();
   console.log(d.getDate())
   console.log(d.getDay()+1)
  d.setDate(d.getDate() - d.getDay()+1);
  </code></pre>
  
  <p>the code is working fine except for sunday (26-11-2017) manaully changed time to test different cases it returns</p>
  
  <pre><code>Mon Nov 27 2017 23:50:39 GMT-0800 (Pacific Standard Time) 
  </code></pre>
  
  <p>for other dates like </p>
  
  <p>25-11-2017 it return  Mon Nov 20 2017 23:50:39 GMT-0800 (Pacific Standard Time) </p>
  
  <p>24-11-2017 it return  Mon Nov 20 2017 23:50:39 GMT-0800 (Pacific Standard Time) </p>
  
  <p>22-11-2017 it return  Mon Nov 20 2017 23:50:39 GMT-0800 (Pacific Standard Time) 
  that is desired but <strong>for EVERY sunday it returns the upcoming monday</strong> i couldn't figure out something good</p>
  
  <p>In short i want to start my week from monday not from sunday </p>