How to get start and end of day in Javascript?

 

How to get start and end of day in Javascript?

 



var start = new Date();
start.setUTCHours(0,0,0,0);

var end = new Date();
end.setUTCHours(23,59,59,999);

alert( start.toUTCString() + ':' + end.toUTCString() );

Tags:

Share:

Related posts