You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@sharkdp the reason for the wrong result of 'human' for negative duration is the usage of 'floor' command. 'floor' returns the largest integer less than or equal to the given number. In our case, we are getting '-4' when we provide '-3.5' as input as '-4' is the largest integer less than or equal to '-3.5'.
Example case: human (-3.5 days)
There can be two possible solutions for this issue:
1-) The one suggested in PR #400. To use ago instead in case of negative duration, the expected output would be: 3 days 12 hours ago
2-) Use abs() function to floor the duration to a positive integer first and then showing the output in this format: - (3 days + 12 hours)
Let me know which one seems more reasonable or if you have anything else in mind, I would be happy to contribute.
@sharkdp yes, the solution in PR #425 is using 'ago' in case of negative duration. If Numbat is ready to have two variants of human, human_date and human_time, then merging the PR will resolve this issue also.
The text was updated successfully, but these errors were encountered: