emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/time-stamp.el


From: Juanma Barranquero
Subject: [Emacs-diffs] Changes to emacs/lisp/time-stamp.el
Date: Mon, 16 May 2005 07:33:54 -0400

Index: emacs/lisp/time-stamp.el
diff -c emacs/lisp/time-stamp.el:1.56 emacs/lisp/time-stamp.el:1.57
*** emacs/lisp/time-stamp.el:1.56       Mon Jun 14 00:20:28 2004
--- emacs/lisp/time-stamp.el    Mon May 16 11:33:47 2005
***************
*** 270,276 ****
          (string-match "\\`\\(\\(-?[0-9]+\\)/\\)?\\([^%]+\\)?\\(\\(%[-.,:@+_ 
#^()0-9]*[A-Za-z%][^%]*\\)*%[-.,:@+_ #^()0-9]*[A-Za-z%]\\)?\\([^%]+\\)?\\'" 
time-stamp-pattern)
          (and (match-beginning 2)
               (setq line-limit
!                    (string-to-int (match-string 2 time-stamp-pattern))))
          (and (match-beginning 3)
               (setq ts-start (match-string 3 time-stamp-pattern)))
          (and (match-beginning 4)
--- 270,276 ----
          (string-match "\\`\\(\\(-?[0-9]+\\)/\\)?\\([^%]+\\)?\\(\\(%[-.,:@+_ 
#^()0-9]*[A-Za-z%][^%]*\\)*%[-.,:@+_ #^()0-9]*[A-Za-z%]\\)?\\([^%]+\\)?\\'" 
time-stamp-pattern)
          (and (match-beginning 2)
               (setq line-limit
!                    (string-to-number (match-string 2 time-stamp-pattern))))
          (and (match-beginning 3)
               (setq ts-start (match-string 3 time-stamp-pattern)))
          (and (match-beginning 4)
***************
*** 558,566 ****
         ((eq cur-char ?y)              ;year
          (or alt-form (not (string-equal field-width ""))
              (time-stamp-conv-warn "%y" "%:y"))
!         (string-to-int (format-time-string "%Y" time)))
         ((eq cur-char ?Y)              ;4-digit year, new style
!         (string-to-int (format-time-string "%Y" time)))
         ((eq cur-char ?z)              ;time zone lower case
          (if change-case
              ""                        ;discourage %z variations
--- 558,566 ----
         ((eq cur-char ?y)              ;year
          (or alt-form (not (string-equal field-width ""))
              (time-stamp-conv-warn "%y" "%:y"))
!         (string-to-number (format-time-string "%Y" time)))
         ((eq cur-char ?Y)              ;4-digit year, new style
!         (string-to-number (format-time-string "%Y" time)))
         ((eq cur-char ?z)              ;time zone lower case
          (if change-case
              ""                        ;discourage %z variations
***************
*** 597,603 ****
          (let* ((initial-length (length padded-result))
                 (desired-length (if (string-equal field-width "")
                                     initial-length
!                                  (string-to-int field-width))))
            (if (> initial-length desired-length)
                ;; truncate strings on right, years on left
                (if (stringp field-result)
--- 597,603 ----
          (let* ((initial-length (length padded-result))
                 (desired-length (if (string-equal field-width "")
                                     initial-length
!                                  (string-to-number field-width))))
            (if (> initial-length desired-length)
                ;; truncate strings on right, years on left
                (if (stringp field-result)
***************
*** 621,627 ****
                               (format "%%:%c" format-char)))
      (if (and alt-form (not (string-equal field-width "")))
        ""                              ;discourage "%:2d" and the like
!       (string-to-int (format-time-string format-string time)))))
  
  (defvar time-stamp-conversion-warn t
    "Warn about soon-to-be-unsupported forms in `time-stamp-format'.
--- 621,627 ----
                               (format "%%:%c" format-char)))
      (if (and alt-form (not (string-equal field-width "")))
        ""                              ;discourage "%:2d" and the like
!       (string-to-number (format-time-string format-string time)))))
  
  (defvar time-stamp-conversion-warn t
    "Warn about soon-to-be-unsupported forms in `time-stamp-format'.




reply via email to

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