javascript - Minutes and Seconds between 2 Datetimes -


how can minutes , seconds in format -> mm:ss

// tried var cur_time = new date(); var round_end_on = new date(date.parse(round_time,"y-m-d h:i:s"));  var diff = round_end_on - cur_time; var remaining_minutes = diff / 1000 / 60; var remaining_seconds = ???; 

remaining_minutes seems work, don't know how remaining seconds.

try this:

var remaining_seconds = diff / 1000; 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -