Function: time-stamp-do-number
time-stamp-do-number is a byte-compiled function defined in
time-stamp.el.gz.
Signature
(time-stamp-do-number FORMAT-CHAR ALT-FORM FIELD-WIDTH TIME)
Documentation
Handle compatible FORMAT-CHAR where only default width/padding will change.
ALT-FORM is whether # was specified. FIELD-WIDTH is the string
width specification or "". TIME is the time to convert.
This is an internal helper for time-stamp-string-preprocess.
Source Code
;; Defined in /usr/src/emacs/lisp/time-stamp.el.gz
(defun time-stamp-do-number (format-char alt-form field-width time)
"Handle compatible FORMAT-CHAR where only default width/padding will change.
ALT-FORM is whether `#' was specified. FIELD-WIDTH is the string
width specification or \"\". TIME is the time to convert.
This is an internal helper for `time-stamp-string-preprocess'."
(let ((format-string (concat "%" (char-to-string format-char))))
(if (and (> alt-form 0) (not (string-equal field-width "")))
"" ;discourage "%:2d" and the like
(string-to-number (time-stamp--format format-string time)))))