Returns a new DateRange relative to the CalculationDate starting 29 days before the CalculationDate up to and including the CalculationDate.

var date = now.valueOf('2017-03-15'); 

var range = date.last30Days();

console.log('Date range = %s', range);

//Date range = 2017-02-13 00:00:00 -> 2017-03-15 00:00:00
Did this answer your question?