Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Simple solution in Clear category for Time Converter (24h to 12h) by ojisan
def time_converter(time):
h,m = map(int,time.split(':'))
s = '{0}:{1:02d} {2}'.format(h+12 if h==0 and m==0 else h-12 if h>12 else h,m,["a.m.","p.m."][h>11])
return s
Sept. 7, 2019
Comments: