Function: world-clock--sort-entries

world-clock--sort-entries is a byte-compiled function defined in time.el.gz.

Signature

(world-clock--sort-entries TZLIST TIMEVAL)

Documentation

Sort TZLIST according to world-clock-sort-order at a given TIMEVAL.

Source Code

;; Defined in /usr/src/emacs/lisp/time.el.gz
(defun world-clock--sort-entries (tzlist timeval)
  "Sort TZLIST according to `world-clock-sort-order' at a given TIMEVAL."
  (pcase world-clock-sort-order
    ((pred null) tzlist)
    ((or (and (pred stringp) format)
	 `(,(and (pred stringp) format) .
	   ,(and (pred booleanp) reverse)))
     (sort tzlist
	   :key (lambda (entry)
		  (format-time-string format timeval (car entry)))
	   :reverse reverse))
    ((pred functionp) (funcall world-clock-sort-order tzlist timeval))
    (_ (error "Invalid `world-clock-sort-order': `%s'"
	      world-clock-sort-order))))