You are viewing a single comment's thread. Return to all comments →
JavaScript
function timeConversion(s) {
let [hours, minutes, seconds] = s.split(':'); if (hours === '12'){ hours = '00'; } if (seconds.indexOf('PM') != -1 && hours < 12 ){ hours = parseInt(hours, 10) + 12; } let conversion = ``${hours}:$`{minutes}:${seconds}` return conversion.slice(0, -2);
}
Seems like cookies are disabled on this browser, please enable them to open this website
Time Conversion
You are viewing a single comment's thread. Return to all comments →
JavaScript
function timeConversion(s) {
}