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
Post a Comment