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 rodka81
def time_converter(time):
hh, mm = (int(d) for d in time.split(':'))
pf = 'a.m.'
if hh >= 12:
hh -= 12
pf = 'p.m.'
if hh == 0:
hh += 12
return "{}:{:02d} {}".format(int(hh), int(mm), pf)
Sept. 16, 2018