Returns a new DateRange relative to the CalculationDate starting at the beginning of the year that contains the CalculationDate extending up to and including the CalculationDate.
var date = now.valueOf('2017-03-15');
var range = date.yearToDate();
console.log('Date range = %s', range);
//Date range = 2017-00-01 00:00:00 -> 2017-03-15 00:00:00