aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/time-stamp.el15
1 files changed, 10 insertions, 5 deletions
diff --git a/lisp/time-stamp.el b/lisp/time-stamp.el
index 2aa5ba74dc3..1ee37b8076b 100644
--- a/lisp/time-stamp.el
+++ b/lisp/time-stamp.el
@@ -488,10 +488,15 @@ Internal helper used by `time-stamp-string-preprocess'."
488 (format-time-string format time time-stamp-time-zone)) 488 (format-time-string format time time-stamp-time-zone))
489 489
490(defun time-stamp-string (&optional ts-format time) 490(defun time-stamp-string (&optional ts-format time)
491 "Generate the new string to be inserted by \\[time-stamp]. 491 "Return the current time and other info formatted for \\[time-stamp].
492Optionally use format TS-FORMAT instead of `time-stamp-format' to 492Optional first argument TS-FORMAT gives the format to use; it defaults
493format the string. Optional second argument TIME is only for testing; 493to the value of `time-stamp-format'. Thus, with no arguments,
494normally the current time is used." 494this function returns the string `time-stamp' would use to update
495its template in the buffer. The format accepted is similar to the
496format used by `format-time-string' with some extensions; see the
497documentation of `time-stamp-format' for details.
498Optional second argument TIME is only for testing; normally the current
499time is used. The time zone is determined by `time-stamp-time-zone'."
495 (if (stringp (or ts-format (setq ts-format time-stamp-format))) 500 (if (stringp (or ts-format (setq ts-format time-stamp-format)))
496 (time-stamp-string-preprocess ts-format time))) 501 (time-stamp-string-preprocess ts-format time)))
497 502
@@ -790,7 +795,7 @@ This is an internal helper for `time-stamp-string-preprocess'."
790 795
791(defun time-stamp-do-number (format-char alt-form field-width time) 796(defun time-stamp-do-number (format-char alt-form field-width time)
792 "Handle compatible FORMAT-CHAR where only default width/padding will change. 797 "Handle compatible FORMAT-CHAR where only default width/padding will change.
793ALT-FORM is whether `#' was specified. FIELD-WIDTH is the string 798ALT-FORM is non-0 if \":\" was specified. FIELD-WIDTH is the string
794width specification or \"\". TIME is the time to convert. 799width specification or \"\". TIME is the time to convert.
795This is an internal helper for `time-stamp-string-preprocess'." 800This is an internal helper for `time-stamp-string-preprocess'."
796 (let ((format-string (concat "%" (char-to-string format-char)))) 801 (let ((format-string (concat "%" (char-to-string format-char))))