Subtract date in javascript : -
var current = new Date();
//It will give the current date and time in default format.
var future_date = new Date(now .setHours(now .getHours()+48));
//in this we add 48 hours in present time .
var result = Math.abs(future_date - current);
resultant 'result' is in milliseconds.
0 Comment(s)