lithium / Pomodoro

Android Pomodoro Productivity Timer
http://android.hlidskialf.com/software/pomodoro
Apache License 2.0
38 stars 26 forks source link

Pad single digit numbers with zeros to a width of two #10

Open paultcochrane opened 9 years ago

paultcochrane commented 9 years ago

This change gives the time display a more standardised/common look. When using the app, I was surprised to see the seconds display go down to a single digit and the display not to be padded by a zero, as this is not the behaviour a standard digital clock has. This is the reasoning behind this commit: to reduce surprise to users.

surr commented 9 years ago

There is a different issue with printing time, that could be fixed here too. Negative times are computed and printed wrong. I suppose, that Math.abs should be applied directly to left variable before computation of min and sec. So the time line would be '0:01' -> '0:00' -> '-0:00' -> '-0:01' and so on.