I am completely baffled on what is happening with my javascript date. Here is my javascript:
toDate(date) {
return date instanceof Date ? date : new Date(date)
}
When I pass the string "2016-12-01"
to this function, I get this for my date
Wed Nov 30 2016 17:00:00 GMT-0700 (MST)
I am not passing in timezone information, just the string shown above. When I type the same code into my console, I get the same behavior.
Here is another example when I pass in timezone information where the same thing happens.
This is happening Chrome version 55.0.2883.75 (64-bit).
I tested in Firefox 50.0.2 and I am not having this issue.
Any ideas?