Moment suddenly started to format dates incorrectly. Like, completely changing them. I don't understand why. I made a short video so you can see what's going on here: https://youtu.be/WPLDiiWsfAo
Here's some of the code that's working wrong:
activeProject() {
let proj = { ...this.$store.state.activeProject };
if (proj.Start) {
debugger;
proj.Start = moment(proj.Start).format("MM/DD/YYYY");
proj.End = moment(proj.End).subtract(1, "days").format("MM/DD/YYYY");
return proj;
} else return {};
},
proj.Start = "2021-03-01T00:00:00.000Z" outputs 02/28/2021
proj.End = "2021-03-08T00:00:00.000Z" outputs 03/06/2021
So after formatting with moment, it takes 1 days off of proj.Start and proj.End. Why would it be doing this?