'Subtraction of days on DateObjects in JavaScript is not working (as expected)

Can someone please tell me why the console logs untilDate Mon Mar 14 2022 here when it should log untilDate Thu Dec 14 2021

let _untilDate = new Date(); // Mon Mar 14 2022
let _fromDate = new Date(); // Mon Mar 14 2022

_fromDate.setDate(_untilDate.getDate() - 89);
///_fromDate should now be Wed Dec 15 2021
_untilDate.setDate(_fromDate.getDate() - 1);
///_untilDate should now be Thu Dec 14 2021
console.log(`untilDate: ${_untilDate.toDateString()}`);
//actually logs untilDate Mon Mar 14 2022
console.log(`fromDate: ${_fromDate.toDateString()}`);


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source