Can anybody explain the following behaviour with dash-separated dates?
console.log(new Date('2015/03/03'));
Tue Mar 03 2015 00:00:00 GMT+0000 (GMT Standard Time)
console.log(new Date('2015-03-03'));
Tue Mar 03 2015 00:00:00 GMT+0000 (GMT Standard Time)
console.log(new Date('2015/04/03'));
Fri Apr 03 2015 00:00:00 GMT+0100 (GMT Daylight Time)
console.log(new Date('2015-04-03'));
Fri Apr 03 2015 01:00:00 GMT+0100 (GMT Daylight Time) // This is the weird one
Note: I am on UK, so GMT+0 during winter, GMT+1 during "summer".
Note 2: I've read I should use '/' as a separator, specially as IE11 does not do it but I am wondering how that can happen in Chrome?
Note 3: In NodeJS it gets even weirder.
console.log(new Date('2015/03/03'));
2015-03-03T00:00:00.000Z
console.log(new Date('2015-03-03'));
2015-03-03T00:00:00.000Z
console.log(new Date('2015/04/03'));
2015-04-02T23:00:00.000Z //This is the weird one this time
console.log(new Date('2015-04-03'));
2015-04-03T00:00:00.000Z