Closed IlanCosman closed 3 years ago
I guess this would be one way to go especially since there's no indication that https://github.com/fishpkg/fish-humanize-duration/pull/2 will ever be merged.
This sounds good to me, thank you @IlanCosman and @ammgws ā have you tested these changes?
Yes, I have tested it. It doesn't display milliseconds though, but I can add that if you wish.
@IlanCosman I'm not even sure if it is useful to know the ms, but I suppose it wouldn't hurt either. Any takes on this @ammgws?
@franciscolourenco If it is made to correctly handle durations over 60 hours then it should be good to go. That same bug exists with humanize_duration itself, and investigating that is what led me to rewrite it using fish builtins in https://github.com/fishpkg/fish-humanize-duration/pull/2.
See wrong times given when the duration is longer than 60 hours:
>__done_humanize_duration 23000000
6h 23m 20sā
>__done_humanize_duration 230000000
3h 53m 20sā
Fixed š Modding by 60 for hours was completely ridiculous anyways. It's 24 hours to a day not 60 š
Thank you for the contribution!
This way is pure fish and removes dependencies. It is also much faster.