Function: magit--age
magit--age is a natively compiled function defined in magit-margin.el.
Signature
(magit--age DATE &optional ABBREVIATE)
Source Code
;; Defined in /nix/store/irvbdy0zra0dn8fpd008f32x5ix6qm5v-emacs-packages-deps/share/emacs/site-lisp/elpa/magit-20261005.508/magit-margin.el
(defun magit--age (date &optional abbreviate)
(named-let calc ((age (abs (- (float-time)
(if (stringp date)
(string-to-number date)
date))))
(spec magit--age-spec))
(pcase-let* ((`((,char ,unit ,units ,weight) . ,spec) spec)
(cnt (round (/ age weight 1.0))))
(if (or (not spec)
(>= (/ age weight) 1))
(list cnt (cond (abbreviate char)
((= cnt 1) unit)
(units)))
(calc age spec)))))