How would you go about determining how many minutes until midnight of the current day using javascript?
function minutesUntilMidnight() { var midnight = new Date(); midnight.setHours( 24 ); midnight.setMinutes( 0 ); midnight.setSeconds( 0 ); midnight.setMilliseconds( 0 ); return ( midnight.getTime() - new Date().getTime() ) / 1000 / 60; }
1.4m articles
1.4m replys
5 comments
57.0k users