You are viewing a single comment's thread. Return to all comments →
function timeConversion(s: string): string { if (s.startsWith("12") && s.endsWith("PM")) { return s.slice(0,8); } return s.startsWith("12") ? `00${s.slice(2,8)}` : s.endsWith("AM") ? s.slice(0,8) : `${+s.slice(0,2) + 12}${s.slice(2,8)}`; }
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 →