PageRenderTime 223ms CodeModel.GetById 201ms app.highlight 19ms RepoModel.GetById 1ms app.codeStats 0ms

/pyjs/tests/test018.py

http://pyjamas.googlecode.com/
Python | 10 lines | 10 code | 0 blank | 0 comment | 3 complexity | 9077d4f1397ca17465947ac5d771e0dd MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0
 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