I want to compare two dates using this code

```
  let dob=new Date(this.dob);  
  if(birthDate.getDate()==new Date("1990-01-01").getDate())
  {
    console.log('date is equal');
  }
  else 
  {
    console.log('date is not equal');
  }

```

but it shows date is equal when i have `2022-08-01` this date in `birthDate` variable.
Any solution Thanks