Dapatkan sebelum tanggal 6 bulan JavaScript Node JS

var oneMonthAgo = new Date(
    new Date().getFullYear(),
    new Date().getMonth() - 1, 
    new Date().getDate()
);
console.log(oneMonthAgo);
//$uj@y
$uj@y