Baspar / harbour-picross

Picross game for SailfishOS
4 stars 11 forks source link

Fixed game time formatting #3

Closed Self-Perfection closed 8 years ago

Self-Perfection commented 8 years ago

screenshot-26-09-15-19-31-11_cropped

Before change the game used to show strings like "1:65:2", which have wrong minutes and does not prepend single digit minutes/seconds with zeroes.

toTimeString() function in qml on my device seems to give "hh:mm:ss" right away, but on other js implementations it may give strings like "14:07:21 GMT+0300 (MSK)", so match() should be kept as precaution.

Current code assume that playing time of a level is always less than 23:59:59. Most likely assumption is correct but there is room for improvement.

Baspar commented 8 years ago

Thank's for your contribution ;) I'll add a line or two to just say "23:59:59 or +" in such a case