I created javascript function named “getTheDiffTime” using that function you will be able to fetch the time difference in various format.
function getTheDiffTime(dateone, datetwo,format){
//format = "Days", Hours, Minutes, Seconds
if(dateone > datetwo) {
var seconds = dateone.getTime() - datetwo.getTime();
} else {
var seconds = datetwo.getTime() - dateone.getTime();
}
var second = 1000, minute = 60 * second, hour = 60 * minute, day = 24 * hour;
if(format=="Days"){
var rformat = Math.floor(seconds / day);
seconds -= rformat * day;
//alert("days: "+rformat);
}else if(format=="Hours"){
// find the hours
rformat = translate(seconds / hour);
//alert("hours: "+rformat);
}else if (format=="Minutes"){
//find the mintues
rformat= translate(seconds / minute);
//alert("minutes: "+ rformat);
}else if(format=="Seconds"){
//find the seconds
rformat = translate(seconds / second);
//alert("seconds: "+rformat);
}
return rformat
//alert(rformat);
}
How to use this function here I am giving you the one good example.
I am going to get the current months minutes using this function.
//for calculating the current month in mintue -script currentMonth = new Date(); plus_oneMonth = new Date(); plus_oneMonth.setMonth(plus_oneMonth.getMonth()+1); getTheDiffTime(plus_oneMonth,currentMonth,"Minutes");
You will get return the minutes.



Good day admin, I discovered your website from delicious as well as I learn some of your several other articles.These are very good. Please keep working this great work.
Superb piece of content, this is very similar to a site that I have. Please check it out sometime and feel free to leave me a comenet on it and tell me what you think. Im always looking for feedback.
Excellent site, where did you come up with the information in this blog? Im happy I found it though, ill be checking back soon to see what other articles you have.
This is a very useful post, I was looking for this info. Just so you know I discovered your webpage when I was checking for blogs like mine, so please check out my site sometime and leave me a comment to let me know what you think.