Function: time-stamp-string

time-stamp-string is a byte-compiled function defined in time-stamp.el.gz.

Signature

(time-stamp-string &optional TS-FORMAT TIME)

Documentation

Return the current time and other info formatted for M-x time-stamp (time-stamp).

Optional first argument TS-FORMAT gives the format to use; it defaults to the value of time-stamp-format. Thus, with no arguments, this function returns the string time-stamp would use to update its template in the buffer. The format accepted is similar to the format used by format-time-string with some extensions; see the documentation of time-stamp-format for details. Optional second argument TIME is only for testing; normally the current time is used. The time zone is determined by time-stamp-time-zone.

Source Code

;; Defined in /usr/src/emacs/lisp/time-stamp.el.gz
(defun time-stamp-string (&optional ts-format time)
  "Return the current time and other info formatted for \\[time-stamp].
Optional first argument TS-FORMAT gives the format to use; it defaults
to the value of `time-stamp-format'.  Thus, with no arguments,
this function returns the string `time-stamp' would use to update
its template in the buffer.  The format accepted is similar to the
format used by `format-time-string' with some extensions; see the
documentation of `time-stamp-format' for details.
Optional second argument TIME is only for testing; normally the current
time is used.  The time zone is determined by `time-stamp-time-zone'."
  (if (stringp (or ts-format (setq ts-format time-stamp-format)))
      (time-stamp-string-preprocess ts-format time)))