GNU bug report logs -
#71572
[PATCH] seconds-to-string-approximate
Previous Next
Reported by: JD Smith <jdtsmith <at> gmail.com>
Date: Sat, 15 Jun 2024 17:25:01 UTC
Severity: wishlist
Tags: patch
Merged with 71573
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #7 received at control <at> debbugs.gnu.org (full text, mbox):
merge 71573 71572
thanks
> Cc: Adam Porter <adam <at> alphapapa.net>, jonas <at> bernoul.li
> From: JD Smith <jdtsmith <at> gmail.com>
> Date: Sat, 15 Jun 2024 13:24:00 -0400
> A very useful and widely used time operation is to approximate a given delay or age (in seconds) using a human-readable unit — think "2 hours", "5 days", "3 weeks", or "7 months". We have `seconds-to-string', but it provides more precision than is often required, skips some meaningful "human readable" duration units like weeks and months, and uses abbreviated units exclusively.
>
> For those familiar with magit, the `magit--age' function has provided this capability for quite some time (e.g. for short commit age), and other packages have adapted it. It would be useful to have a version in core.
>
> This patch provides a `seconds-to-string-approximate' function based loosely on `magit--age' and `seconds-to-string'. It allows using abbreviated or full units, and can optionally round to the nearest half-unit.
This is a duplicate of bug#71572, merging.
This bug report was last modified 154 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.