It would be useful to let callers choose the unit used by HumanReadable.duration() and HumanReadable.timeAgo() instead of always auto-scaling to the largest readable unit.
Example use cases:
HumanReadable.duration(3.days, unit = DurationUnit.Hours) // "72 hours"
HumanReadable.timeAgo(instant, unit = DurationUnit.Days) // "32 days ago"
This would help when apps need consistent units in reports or UI labels where automatic unit switching can be confusing.
It would be useful to let callers choose the unit used by
HumanReadable.duration()andHumanReadable.timeAgo()instead of always auto-scaling to the largest readable unit.Example use cases:
This would help when apps need consistent units in reports or UI labels where automatic unit switching can be confusing.