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 JingMeng
def time_converter(time):
h, m = time.split(':')
hour_hand = int(h) % 12
return '%d:%s %s.m.' % ((hour_hand == 0) * 12 + hour_hand,
m, 'p' if int(h) >= 12 else 'a')
June 19, 2019
Comments: