Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Replace 00 to 24 and test it solution in Creative category for Time Converter (24h to 12h) by ludek.reif
def time_converter(time):
hours, minutes = int(time.split(':')[0].replace('00', '24')), time.split(':')[1]
return f"{hours if hours < 13 else hours - 12}:{minutes} {'p.m.' if 11 < hours < 24 else 'a.m.'}"
Sept. 18, 2019