inTimeHHMM = inTime.split(":");
outTimeHHMM = outTime.split(":");
var today = new Date();
var dateInTime = new Date(today.getFullYear(), today.getMonth(), today.getDate(), inTimeHHMM[0], inTimeHHMM[1], 0);
var dateOutTime = new Date(today.getFullYear(), today.getMonth(), today.getDate(), outTimeHHMM[0], outTimeHHMM[1], 0);
if(dateInTime<=dateOutTime){
}else{
dateOutTime.setDate(dateOutTime.getDate() + 1);
}
var diff =(dateOutTime.getTime() - dateInTime.getTime()) / 1000;
diff /= 60;
workingMinutes = Math.abs(Math.round(diff));
Sunday, 11 June 2017
Javascript - In time and out time difference
Subscribe to:
Post Comments (Atom)
Git merge branch to another branch
$ git checkout develop $ git pull $ git checkout test-branch $ git merge develop $ git push
-
/* ValidIpAddressRegex = "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$...
-
Netlify Porter Railway Render fly.io clever-cloud.com vercel
-
You need to take an integer input and then draw the pattern according to it. Say for example if you enter 5 then, the pattern should be like...
No comments:
Post a Comment