Function: erc-stamp--time-as-day
erc-stamp--time-as-day is a byte-compiled function defined in
erc-stamp.el.gz.
Signature
(erc-stamp--time-as-day CURRENT-TIME)
Documentation
Discard hour, minute, and second info from timestamp CURRENT-TIME.
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc-stamp.el.gz
;; Unfortunately, cursory measurements show that this function is 10x
;; slower than `erc-format-timestamp', which is perhaps
;; counterintuitive. Thus, we use the latter for our cache, and
;; perform day alignments via this function only when needed.
(defun erc-stamp--time-as-day (current-time)
"Discard hour, minute, and second info from timestamp CURRENT-TIME."
(defvar current-time-list) ; <=28
(let* ((current-time-list) ; flag
(decoded (decode-time current-time erc-stamp--tz)))
(setf (decoded-time-second decoded) 0
(decoded-time-minute decoded) 0
(decoded-time-hour decoded) 0
(decoded-time-dst decoded) -1
(decoded-time-weekday decoded) nil
(decoded-time-zone decoded)
(and erc-stamp--tz (car (current-time-zone nil erc-stamp--tz))))
(encode-time decoded))) ; may return an integer