title: compare two dates in Angular 6
body: <p>I am new to angular 6 ,Here I need to compare to date inputs and find the greatest one.</p>
  
  <pre><code>input 1 : 2018-12-29T00:00:00
  input 2 : Mon Dec 31 2018 00:00:00 GMT+0530 (India Standard Time)
  </code></pre>
  
  <p>Here I received the <strong>input 1</strong> from mssql database and the <strong>input 2</strong> from the material datepicker .</p>
  
  <p>while compare this two dates as below I got false.</p>
  
  <pre><code>console.log(mMagazineObject.From &lt; mMagazineObject.To ? true : false);
  </code></pre>
  
  <p>is there any possibility to compare these two date formats .If yes please help me to fix this .</p>