title: JavaScript date.format is not a function
body: <p>I am using this piece of code to get string representing date <code>yyyy-mm-dd</code> from a hidden field and then format it as needed:</p>
  
  <pre><code>var date_string = $('#end-date').val();
  var splitDate = date_string.split("-");
  var end_date = new Date(splitDate[0], splitDate[1] - 1, splitDate[2]);
  end_date.format("dddd, mmmm dS, yyyy")
  </code></pre>
  
  <p>But it throws an error:</p>
  
  <pre><code>end_date.format is not a function
  </code></pre>
  
  <p>Why does it happen and how to solve this issue?</p>