export function shiftDate ( date , numDays ) { const newDate = new Date ( date ) ; newDate . setDate ( newDate . getDate ( ) + numDays ) ; return newDate ; } export function getBeginningTimeForDate ( date ) { return new Date ( date . getFullYear ( ) , date . getMonth ( ) , date . getDate ( ) ) ; } export function convertToDate ( obj ) { return obj instanceof Date ? obj : new Date ( obj ) ; }