* 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)
committerStephen Gildea <stepheng+emacs@gildea.com>
Fri, 13 Dec 2024 16:56:41 +0000 (08:56 -0800)
lisp/time-stamp.el

index 8c28920d219202130b7c80d08f4ae12fee16f1eb..69c059f62548e1251b53bda9c533a83af8932631 100644 (file)
@@ -561,6 +561,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 ?%)