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 rybld2
def time_converter(time):
heure, minute, plus = time[0:2], time[3:5], ''
plus = ' p' if int(heure) > 11 else ' a'
if int(heure)==0:
heure='12'
if int(heure) < 10:
heure = time[1:2]
elif int(heure) > 12:
heure = str(int(heure) - 12)
return heure + ':' + minute + plus + '.m.'
Jan. 1, 2021
Comments: