I have a function that takes in various (valid) date strings and outputs a JavaScript Date.
Most strings return the expected date, however, when an ISO formatted date is passed in (YYYY/MM/DD), The user's timezone offset is SUBTRACTED from the date.
So:
new Date("9/1/2017") //returns Fri Sep 01 2017 00:00:00 GMT-0400 (Eastern Daylight Time)
but
new Date("2017-09-01") //returns Thu Aug 31 2017 20:00:00 GMT-0400 (Eastern Daylight Time)
I've found that by forcing the timezone by adding the time - "T00:00:00" to the ISO date forces it to the correct date & time, but was wondering why JavaScript subtracts out the timezone only for ISO dates.