Created
June 16, 2017 11:37
-
-
Save vikasavnish/7cde1dcff8f5fc77ddd7d0da42be98d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function parseTime(t1){ | |
t3=t1.split(" ")[1]=='pm'?(parseInt(t1.split(" ")[0].split(":")[0])*60+parseInt(t1.split(" ")[0].split(":")[1])+720):parseInt(t1.split(" ")[0].split(":")[0]*60)+parseInt(t1.split(" ")[0].split(":")[1]) | |
return t3 | |
} | |
function compare(t1,t2){ | |
console.log(parseTime(t1)) | |
console.log(parseTime(t2)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment