title: ASP.NET Parse DateTime result from ajax call to javascript date
body: <p><strong>Introduction:</strong></p>
  
  <p>I have a <code>WebMethod</code> on my ASP.NET page which returns a <code>Person</code> object.
  One of the fields is <code>Birthday</code> which is a <code>DateTime</code> property.</p>
  
  <p><strong><em>WebMethod</em></strong></p>
  
  <pre><code>[WebMethod]
  public static Person GetPerson()
  {
       Person p = new Person() {
           Id = 1,
           Name = "Test",
           Birthday = new DateTime(1988, 9, 13)
       };
  
       return p;
  }
  </code></pre>
  
  <p>If I make the call using <code>$.ajax()</code> I get the response of the server with the <code>Person</code> object.</p>
  
  <p><strong><em>Ajax call</em></strong></p>
  
  <pre><code>// Class instance
  var Ajaxcalls = function () {
  
  }
  
  _$.extend(Ajaxcalls, {
      GetPerson: function (label) {
          var self = label instanceof _$ ? label : $(label);
  
          _$.ajax({
              url: 'Default.aspx/GetPerson',
              type: "POST",
              dataType: "json",
              contentType: "application/json; charset=utf-8",
              success: function (data) {
                  console.log(JSON.stringify(data.d));
                  self.html(new Date(Date.parse(data.d.Birthday)));
              }
          });
      }
  });
  </code></pre>
  
  <p><strong><em>Result:</em></strong></p>
  
  <pre><code>{"__type":"AjaxTest.Classes.Person","Id":1,"Name":"Test","Birthday":"/Date(590104800000)/"}
  </code></pre>
  
  <p><strong>Problem</strong></p>
  
  <p>How do I parse the <code>Birthday</code> [/Date(590104800000)/] to a javascript/jQuery date?
  I tried <code>new Date(Date.parse(data.d.Birthday))</code> but it gives me an <code>Invalid date</code>.</p>