title: Angular 6 - Compare date string with date on an array filter
body: <p>I need to know if the date is equal to or less than today.</p>
  
  <pre><code>  let currentTimeInSeconds = new Date().getTime() / 1000;
    currentTimeInSeconds = currentTimeInSeconds.toString().substring(0, currentTimeInSeconds.toString().indexOf('.'));
    this.UnpaidDuebills = this.UnpaidDuebills.filter(bills =&gt; bills.expirationDate &lt;= currentTimeInSeconds);
  </code></pre>
  
  <p><code>bills.expirationDate</code> returns a date such as <code>22/01/2018</code> in string format.</p>
  
  <p>I don't know how to transform that string format in seconds inside that array filter.</p>