title: How to compare datetime in Javascript?
body: <p><strong>Given</strong> <br>
  var fromDatetime = "10/21/2014 08:00:00"; <br>
  var toDatetime = "10/21/2014 07:59:59"; </p>
  
  <p><strong>Target</strong> <br>
  Need to compare this two given datetime to check if this is a valid datetime inputs. </p>
  
  <p>Im thinking that I could use this solution. . <br>
  var fromDatetime = new date("10/21/2014 08:00:00"); <br>
  var toDatetime = new date("10/21/2014 07:59:59");</p>
  
  <p>then compare each segment <br>
  fromDatetime.getFullYear() to toDatetime.getFullYear(), <br>
  fromDatetime.getMonth() to toDatetime.getMonth(), <br>
  so on so forth until I get a non equal comparison, then return.</p>
  
  <p>My question is. . <strong>Is that the best case in comparing datetime in Javascript?</strong></p>
  
  <p>Any suggested solutions other than this will be much appreciated. . 
  Thank you in advance. </p>