Don't use the Date constructor, or Date.parse, to parse date strings. The format:
"2016-05-17"
is treated as local by ISO 8601, but as UTC by ECMA-262. Some browsers will treat it as UTC, some as local and some won't parse it at all. It seems that your browser is treating it as UTC (per the standard) and you are in a time zone that is west of GMT, so you see a date that is one day earlier than expected.
Note that a date and time string without time zone (e.g. "2016-05-17T00:00:00") is treated as local by ECMA-262.
So always manually parse strings. A library can help, but often is more than is required. So if you want "2016-05-17" parsed as local, use:
function parseISOLocal(s) {
var b = s.split(/\D/);
return new Date(b[0], b[1]-1, b[2]);
}
document.write(parseISOLocal('2016-05-17'));