I'm trying to subtract one month from `2015-12-31` but it gives me `2015-12-01` instead of `2015-11-30`. Why ?

Code:

```
var date1 = new Date('2015-12-31');
var date2 = new Date(date1);

date2.setMonth(date1.getMonth() - 1);
console.log(date1);
console.log(date2);

```

Output:

```
Thu Dec 31 2015 01:00:00 GMT+0100 (CET)
Tue Dec 01 2015 01:00:00 GMT+0100 (CET)

```

Any workaround?