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.
Incoming search terms:
- javascript get time difference in minutes
- how to calculate time difference in javascript in minutes
- time difference in hours and minutes javascript
- javascript date difference in minutes
- time difference calculator in minutes javascript
- calculate minute/hour/second difference with jquery
- time difference in javascript in minutes
- time difference in javascript in seconds
- uidatepicker get minute second
- on change time difference calculation in javascript
- jquery time difference
- javascript time difference in minutes
- javascript get time difference in day mins seconds
- javascript date time difference in minutes
- javascript date difference in hours and minutes
- find difference of time for wordpress post
- date difference in javascript in minutes
- wordpress post time today minute seconds






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.
When I originally commented I clicked the -Notify me when new comments are added- checkbox and now every time a comment is added I purchase four emails considering the same comment. Is there any way you possibly can remove me from that service? Thanks!
Great read. Thanks for the info!
Good! Thank you! I always wanted to write in my site something like that. Can I take part of your post to my blog?
I would like to say “wow” what a inspiring post. This is really great. Keep doing what you’re doing!!
I’ve been checking your blog for a while now, seems like everyday I learn something new
Thanks
I was just having a conversation over this I am glad I came across this it cleared some of the questions I had.
Good night your webblog is good!! Im pretty sure I am coming back to see interesting articles