From: Stephen Gildea Date: Fri, 13 Dec 2024 16:53:54 +0000 (-0800) Subject: * lisp/time-stamp.el: Limit field width to two digits. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6ebc958b699b0a541a426c16c4c4b6bb5eadb756;p=emacs.git * lisp/time-stamp.el: Limit field width to two digits. (cherry picked from commit 488801baf7de64cc3ad8747c7a0c9f5869afb4e2) --- diff --git a/lisp/time-stamp.el b/lisp/time-stamp.el index 50d75ecac01..c9f451cb8cc 100644 --- a/lisp/time-stamp.el +++ b/lisp/time-stamp.el @@ -569,6 +569,8 @@ and all `time-stamp-format' compatibility." (setq field-width "1" flag-minimize t)) ((eq cur-char ?_) (setq field-width "2" flag-pad-with-spaces t)))) + (if (> (string-to-number field-width) 99) + (setq field-width (if flag-pad-with-zeros "099" "99"))) (setq field-result (cond ((eq cur-char ?%)