title: Convert C# DateTime to Javascript Date
body: <p>I have a function in Javascript that receives a C# DateTime from MVC.
  If the date is null it should return "-", if it's a valid date it should return the formated date.</p>
  
  <p>IMPORTANT: It's not possible to send the date in another format from C#.</p>
  
  <p>Javascript:</p>
  
  <pre><code>function CheckDate(date) {
  
    if (date == "Mon Jan 01 0001 00:00:00 GMT+0000 (GMT Daylight Time)")
      return "-";
    else {
      var dat = new Date(date);
      return dat.getFullYear() + dat.getMonth() + dat.getDay();
    }
  </code></pre>
  
  <p>Is there a better way to compare if the date is the C# New DateTime?</p>
  
  <p>And how do I parse and return the date in "yyyy/MM/dd" format?</p>