/[emacs]/emacs/lisp/time-stamp.el
ViewVC logotype

Diff of /emacs/lisp/time-stamp.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.56 by teirllm, Mon Jun 14 00:20:28 2004 UTC revision 1.57 by lektu, Mon May 16 11:33:47 2005 UTC
# Line 270  template." Line 270  template."
270            (string-match "\\`\\(\\(-?[0-9]+\\)/\\)?\\([^%]+\\)?\\(\\(%[-.,:@+_ #^()0-9]*[A-Za-z%][^%]*\\)*%[-.,:@+_ #^()0-9]*[A-Za-z%]\\)?\\([^%]+\\)?\\'" time-stamp-pattern)            (string-match "\\`\\(\\(-?[0-9]+\\)/\\)?\\([^%]+\\)?\\(\\(%[-.,:@+_ #^()0-9]*[A-Za-z%][^%]*\\)*%[-.,:@+_ #^()0-9]*[A-Za-z%]\\)?\\([^%]+\\)?\\'" time-stamp-pattern)
271            (and (match-beginning 2)            (and (match-beginning 2)
272                 (setq line-limit                 (setq line-limit
273                       (string-to-int (match-string 2 time-stamp-pattern))))                       (string-to-number (match-string 2 time-stamp-pattern))))
274            (and (match-beginning 3)            (and (match-beginning 3)
275                 (setq ts-start (match-string 3 time-stamp-pattern)))                 (setq ts-start (match-string 3 time-stamp-pattern)))
276            (and (match-beginning 4)            (and (match-beginning 4)
# Line 558  and all `time-stamp-format' compatibilit Line 558  and all `time-stamp-format' compatibilit
558           ((eq cur-char ?y)              ;year           ((eq cur-char ?y)              ;year
559            (or alt-form (not (string-equal field-width ""))            (or alt-form (not (string-equal field-width ""))
560                (time-stamp-conv-warn "%y" "%:y"))                (time-stamp-conv-warn "%y" "%:y"))
561            (string-to-int (format-time-string "%Y" time)))            (string-to-number (format-time-string "%Y" time)))
562           ((eq cur-char ?Y)              ;4-digit year, new style           ((eq cur-char ?Y)              ;4-digit year, new style
563            (string-to-int (format-time-string "%Y" time)))            (string-to-number (format-time-string "%Y" time)))
564           ((eq cur-char ?z)              ;time zone lower case           ((eq cur-char ?z)              ;time zone lower case
565            (if change-case            (if change-case
566                ""                        ;discourage %z variations                ""                        ;discourage %z variations
# Line 597  and all `time-stamp-format' compatibilit Line 597  and all `time-stamp-format' compatibilit
597            (let* ((initial-length (length padded-result))            (let* ((initial-length (length padded-result))
598                   (desired-length (if (string-equal field-width "")                   (desired-length (if (string-equal field-width "")
599                                       initial-length                                       initial-length
600                                     (string-to-int field-width))))                                     (string-to-number field-width))))
601              (if (> initial-length desired-length)              (if (> initial-length desired-length)
602                  ;; truncate strings on right, years on left                  ;; truncate strings on right, years on left
603                  (if (stringp field-result)                  (if (stringp field-result)
# Line 621  width specification or \"\".  TIME is th Line 621  width specification or \"\".  TIME is th
621                                 (format "%%:%c" format-char)))                                 (format "%%:%c" format-char)))
622      (if (and alt-form (not (string-equal field-width "")))      (if (and alt-form (not (string-equal field-width "")))
623          ""                              ;discourage "%:2d" and the like          ""                              ;discourage "%:2d" and the like
624        (string-to-int (format-time-string format-string time)))))        (string-to-number (format-time-string format-string time)))))
625    
626  (defvar time-stamp-conversion-warn t  (defvar time-stamp-conversion-warn t
627    "Warn about soon-to-be-unsupported forms in `time-stamp-format'.    "Warn about soon-to-be-unsupported forms in `time-stamp-format'.

Legend:
Removed from v.1.56  
changed lines
  Added in v.1.57

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26