Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Very Basic Notion of Time Modulus 12 solution in Clear category for Time Converter (24h to 12h) by --Serial_Sniper--
"use strict";
function timeConverter(dayTime) {
var hours = dayTime.slice(0, 2);
var AmOrPm = hours >= 12 ? 'p.m.' : 'a.m.';
hours = (hours % 12) || 12;
return `${hours}${dayTime.slice(2)} ${AmOrPm}`;
}
July 11, 2020
Comments: