title: Get next date from weekday in JavaScript
body: <p>How can one return the next <strong>date</strong> of a given weekday (it could be either a number 0-6 or names Sunday-Saturday).</p>
  
  <p>Example, if today, on <strong>Friday 16-Oct-2009</strong>  I passed in:</p>
  
  <ul>
  <li><strong>Friday</strong>, it would return today's date <strong>16-Oct-2009</strong></li>
  <li><strong>Saturday</strong> returns <strong>17-Oct-2009</strong></li>
  <li><strong>Thursday</strong> returns <strong>22-Oct-2009</strong></li>
  </ul>