]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/time-stamp.el: Limit field width to two digits.
authorStephen Gildea <stepheng+emacs@gildea.com>
Fri, 13 Dec 2024 16:53:54 +0000 (08:53 -0800)
committerEshel Yaron <me@eshelyaron.com>
Sun, 15 Dec 2024 16:37:48 +0000 (17:37 +0100)
(cherry picked from commit 488801baf7de64cc3ad8747c7a0c9f5869afb4e2)

lisp/time-stamp.el

index 50d75ecac01520a6be445b986891a2d422d797c6..c9f451cb8ccebc2a6ebe37283c7d7317870bd1f5 100644 (file)
@@ -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 ?%)