find myself frequently formatting elapsed times and relative timestamps when building clis and storing them in the user_themes option, it would be useful to support these out of the box.
.duration : format seconds/timediff as human-readable duration
i.e {.duration {elapsed}} -> [2m 3s] / [42s]
.time_ago : format as relative time string
i.e {.time_ago {ts}} -> "2 minutes ago"
both can take advantage of vendored formatters in the package R/time.R and R/time-ago.R without dependencies, and would be consistent with the .bytes feature from #740
find myself frequently formatting elapsed times and relative timestamps when building clis and storing them in the user_themes option, it would be useful to support these out of the box.
.duration: format seconds/timediff as human-readable durationi.e
{.duration {elapsed}}->[2m 3s]/[42s].time_ago: format as relative time stringi.e
{.time_ago {ts}}->"2 minutes ago"both can take advantage of vendored formatters in the package
R/time.RandR/time-ago.Rwithout dependencies, and would be consistent with the.bytesfeature from #740