Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Time Converter (24h to 12h) by OrginalS
def time_converter(time):
x, y = time.split(":")
x = int(x)
if x < 12:
return f"{x + 12 if x == 0 else x}:{y} a.m."
return f"{x if x == 12 else x-12}:{y} p.m."
Sept. 3, 2019
Comments: