Javascript Date getStartOfDay()

Description

Javascript Date getStartOfDay()

Date.prototype.getStartOfDay = function()
{
    var date = new Date(this);
    date.setHours(0);//w  ww.  j  av a  2  s.  c om
    date.setMinutes(0);
    date.setSeconds(0);
    return date;
}



PreviousNext

Related