Why is getting the MMMM
format on the first day of the month returning the previous month, but returning the correct month starting with the second day of the month, using this format 2020-08-01T00:00:00Z
? Does it have to do with the timezone offset? Example case below:
With the first day of the month:
start = "2020-08-01T00:00:00Z";
month = moment(start).format("MMMM");
console.log(month) // <- July
With the second day of the month:
start = "2020-08-02T00:00:00Z";
month = moment(start).format("MMMM");
console.log(month) // <- August