Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
1-liner solution in Clear category for Time Converter (24h to 12h) by Stensen
def time_converter(time):
h, m = time.split(':');h=int(h)
H = h if h<=12 else h-12
return f"{12 if H==0 else H}:{m} {'p.m.' if h>=12 else 'a.m.'}"
Sept. 22, 2020
Comments: