getDate

A function which returns the passed date with a midnight time portion.

getDate(new Date(2016, 0, 15, 14, 30, 30)); // 2016-01-15 00:00:00

Parameters

date Date

The initial date.

Returns

Date - The date with a midnight time portion.

 /