hako / durafmt

:clock8: Better time duration formatting in Go!
MIT License
496 stars 49 forks source link

Millisecond Functionility to fix a issue when time passed less then second not handled #5

Closed omkar-dev closed 7 years ago

omkar-dev commented 7 years ago

Test Case : timeduration := (12312 time.Hour) + (1 time.Minute) + (1 time.Second) +(100 time.Millisecond)

hako commented 7 years ago

Hey, thanks for the PR! 👍 Ran your test case and it works great! Some of the tests failed though, Could you please fix those before I merge this?

durafmt.ParseString("1m0s") should equal 1 minute not 1 minute 60000 milliseconds

run go test to make sure all tests pass

omkar-dev commented 7 years ago

Yes thanks for the reply ,and also pardon but I am currently occupied can look into it by Monday 10:00 am IST.

Actually it failed because test was not handling millisecond values will just have to include that in the test

Will look into it but will take some time.

Regards Omkar Tondawalkar

On 12 Aug 2017 8:44 p.m., "Wesley Hill" notifications@github.com wrote:

Hey, thanks for the PR! 👍 Ran your test case and it works great! Some of the tests failed though, Could you please fix those before I merge this?

durafmt.ParseString("1m0s") should equal 1 minute not 1 minute 60000 milliseconds

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hako/durafmt/pull/5#issuecomment-321987323, or mute the thread https://github.com/notifications/unsubscribe-auth/AVe3smdMx6Z9-nLjr7qVdUvIf4mJUZRSks5sXcFEgaJpZM4O1ZGK .

omkar-dev commented 7 years ago

Hey Just Fixed the Issue

codecov-io commented 7 years ago

Codecov Report

Merging #5 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master     #5   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           1      1           
  Lines          44     46    +2     
=====================================
+ Hits           44     46    +2
Impacted Files Coverage Δ
durafmt.go 100% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 83a6d8d...8aeebe6. Read the comment docs.