emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-30 488801baf7d: * lisp/time-stamp.el: Limit field width to two dig


From: Stephen Gildea
Subject: emacs-30 488801baf7d: * lisp/time-stamp.el: Limit field width to two digits.
Date: Fri, 13 Dec 2024 11:58:30 -0500 (EST)

branch: emacs-30
commit 488801baf7de64cc3ad8747c7a0c9f5869afb4e2
Author: Stephen Gildea <stepheng+emacs@gildea.com>
Commit: Stephen Gildea <stepheng+emacs@gildea.com>

    * lisp/time-stamp.el: Limit field width to two digits.
---
 lisp/time-stamp.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lisp/time-stamp.el b/lisp/time-stamp.el
index 8c28920d219..69c059f6254 100644
--- a/lisp/time-stamp.el
+++ b/lisp/time-stamp.el
@@ -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 ?%)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]