title: How do I get a date in YYYY-MM-DD format?
body: <p>Normally if I wanted to get the date I could just do something like</p>
  
  <p><code>var d = new Date();
   console.log(d);</code></p>
  
  <p>The problem with doing that, is when I run that code, it returns:</p>
  
  <blockquote>
    <p>Mon Aug 24 2015 4:20:00 GMT-0800 (Pacific Standard Time)</p>
  </blockquote>
  
  <p>How could I get the Date() method to return a value in a "MM-DD-YYYY" format so it would return something like:</p>
  
  <blockquote>
    <p>8/24/2015</p>
  </blockquote>
  
  <p>Or, maybe MM-DD-YYYY H:M</p>
  
  <blockquote>
    <p>8/24/2016 4:20</p>
  </blockquote>