JavaScript Nova data 30 dias atrás

 
let now = new Date();
const backdate = new Date(now.setDate(now.getDate() - 30));

Singh99