Observe the following code and it's output
let str = '2019-06-21';
let dateObj = new Date(str);
console.log(dateObj)
> Thu Jun 20 2019 19:00:00 GMT-0500
The Date object is a day behind than what I specified.
What is a robust way to amend this?
Creating a function to modify the 'DD' portion seems hacky.
I've settled on decrementing the Date object after constructing, but is there a better way?
Why does this behavior happen?