Function: solar-sunrise-sunset-string

solar-sunrise-sunset-string is a byte-compiled function defined in solar.el.gz.

Signature

(solar-sunrise-sunset-string DATE &optional NOLOCATION)

Documentation

String of *local* times of sunrise, sunset, and daylight on Gregorian DATE.

Optional NOLOCATION non-nil means do not print the location.

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/solar.el.gz
(defun solar-sunrise-sunset-string (date &optional nolocation)
  "String of *local* times of sunrise, sunset, and daylight on Gregorian DATE.
Optional NOLOCATION non-nil means do not print the location."
  (let ((l (solar-sunrise-sunset date)))
    (format
     "%s, %s%s (%s hrs daylight)"
     (if (car l)
         (concat "Sunrise " (apply #'solar-time-string (car l)))
       "No sunrise")
     (if (cadr l)
         (concat "sunset " (apply #'solar-time-string (cadr l)))
       "no sunset")
     (if nolocation ""
       (format " at %s" (eval calendar-location-name)))
     (nth 2 l))))