PageRenderTime 142ms CodeModel.GetById 100ms app.highlight 2ms RepoModel.GetById 39ms app.codeStats 0ms

/pyjs/tests/test018.py

http://pyjamas.googlecode.com/
Python | 10 lines | 10 code | 0 blank | 0 comment | 2 complexity | 9077d4f1397ca17465947ac5d771e0dd MD5 | raw file
 1def getHrsMins(mins):
 2    hrs = mins / 60
 3    if hrs > 12:
 4        hrs -= 12
 5    remainder = mins % 60
 6    if remainder < 10:
 7        string_mins = "0" + str(remainder)
 8    else:
 9        string_mins = str(remainder)
10    return str(hrs) + ":" + string_mins