I use Humanizer on TimeSpan with an accuracy of 4:
(dateEnd - dateStart).Humanize(4)
And it generates something like this:
2 hours, 17 minutes, 20 seconds, 141 milliseconds
But when the remaining time is only a few minutes (less than an hour is left), it generates:
17 minutes, 20 seconds, 141 milliseconds, no time
Is there a way to not include this “no time”?
source
share