kevinkhill / php-duration

Convert durations of time between colon-formatted, human-readable, and seconds
MIT License
158 stars 26 forks source link

Added leading zero for "9" minutes and seconds #9

Closed AntonLazarev closed 7 years ago

AntonLazarev commented 7 years ago

Hello, Kevin!

I have fixed a bug in "formatted" method with missed leading zero for values "9" of minutes and seconds where hours or minutes exists accordingly.

Before that fix PHPUnit throwed failure on values "1:09" and "1:09:00", now it passes tests normally.

image

image

image

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 97.541% when pulling b2b284c5703f2e35d035e40cf4db5a7c9d50b790 on AntonLazarev:leading_zero into 39a5cb186b6a48b07b15ae230efb30773b237638 on kevinkhill:master.

kevinkhill commented 7 years ago

Thank you! I didn't even realize I was missing some edge cases.

I also don't know what is wrong with Travis, so thank you for the screenshots.