Returns a new CalculationDate on the specified date and optionally time. If the time is not supplied in the input it will default to 00:00:00.
var date = now.valueOf('2017-03-15');
console.log('date = %s', date);
//date = 2017-03-15 00:00:00
date = now.valueOf('2017-03-15 23:59:59');
console.log('date = %s', date);
//date = 2017-03-15 23:59:59