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 Dai__Nonaka
def time_converter(time):
ap, hour = " a.m.", int(time[:2])
if hour == 0: hour = 12
elif hour >= 12:
ap = " p.m."
if hour > 12:
hour -= 12
return str(hour) + time[2:] + ap
Aug. 10, 2018
Comments: