Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
nice and fluffy 🐇 solution in Clear category for Time Converter (24h to 12h) by vincent.tscherter
function timeConverter(dayTime) {
let [hours, minutes, ampm] = dayTime.split(":");
ampm = +hours < 12 ? 'a.m.' : 'p.m.';
hours = +hours % 12 || 12;
return `${hours}:${minutes} ${ampm}`;
}
May 16, 2020
Comments: