title: Javascript - Formatting Date string to YYYY-MM-DD
body: <p>I need to express a Date as a String with the exact format format:</p>
  
  <pre><code> 2015-01-20   
  </code></pre>
  
  <p>I see there is an date.toIsoFormatString() but not sure where or how to provide the format shown above.</p>
  
  <pre><code> Here is my code:
  
   var future = new Date();
   future.setDate(future.getDate() + 30);
   console.log(future);
  </code></pre>
  
  <p>Now I want future.toString() or future.toIsoFormatString() to display the date in just the YYYY-MM-DD format.</p>