Dates are stored in javascript as yyyy-mm-dd strings whose time part is always 0 like

todays date is

```
"2016-09-04T00:00:00"

```

How to find if date is before current date ?
I tried

```
alert(new Date("2016-09-04T00:00:00") < new Date());

```

but this returns true with is wrong if today is 2016-09-04

`new Date()` returns time also and this produces wrong result.

How to compare date part only ?

Should todays date converted to string and substring used to compare only first 10 characters of strings or is there something better ?

I read answers from referenced question but havent found clear answer to this question. Those answers describe generic solution for date equality comparison. 
This questions asks how to find if date part is before current date.