When parsing a Date string in JavaScript, a value that is in the format YYYY-MM-DD is interpreted as a UTC value, not a local time value.
The key is that the parts are separated by a hyphen and that there is no time zone information in the line. The ECMAScript 5.1 specification says in §15.9.1.15 :
... The offset value for the missing time zone is "Z".
This means that if you do not specify an offset, it is assumed that you mean UTC.
Please note that since this is the opposite of what is specified in ISO-8601, this behavior has been changed in ECMAScript 2015 (6.0), which is specified in § 20.3.1.16 :
... If there is no time zone offset, the date-time is interpreted as local time.
Therefore, when this position of ES6 is implemented correctly, string values of this format, which were previously interpreted as UTC, will be interpreted as local time. I wrote about it here .
The workaround is simple. Replace hyphens with a slash:
var s = "2000-01-01"; var dt = new Date(s.replace(/-/g, '/'));
Another workaround that is acceptable is to set the time of noon instead of midnight to a date. This will be analyzed as local time and far enough to avoid DST conflicts.
var s = "2000-01-01"; var dt = new Date(s + "T12:00:00");
Alternatively, consider a library like moment.js , which is much more reasonable.
var s = "2000-01-01"; var dt = moment(s, 'YYYY-MM-DD').toDate();