I have 2 variables of type Date and I need to substract them. Is there a method in angular for this or do I need to create my own?
I have tried this:
  test: Date = new Date();
  var1: Date = new Date('20-08-2018');
  var2: Date = new Date('15-08-2018');
  testsubstract() {
    this.test = this.var1 - this.var2;
    return this.test;
  }
but I get an error saying "Type number is not assignable to type Date"