Function: diary-hebrew-sabbath-candles

diary-hebrew-sabbath-candles is an autoloaded and byte-compiled function defined in cal-hebrew.el.gz.

Signature

(diary-hebrew-sabbath-candles &optional MARK)

Documentation

Local time of candle lighting diary entry--applies if date is a Friday.

No diary entry if there is no sunset on that date. Uses diary-hebrew-sabbath-candles-minutes.

An optional parameter MARK specifies a face or single-character string to use when highlighting the day in the calendar.

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/cal-hebrew.el.gz
;; To be called from diary-list-sexp-entries, where DATE is bound.
;;;###diary-autoload
(defun diary-hebrew-sabbath-candles (&optional mark)
  "Local time of candle lighting diary entry--applies if date is a Friday.
No diary entry if there is no sunset on that date.  Uses
`diary-hebrew-sabbath-candles-minutes'.

An optional parameter MARK specifies a face or single-character string to
use when highlighting the day in the calendar."
  (require 'solar)
  (or (and calendar-latitude calendar-longitude calendar-time-zone)
      (solar-setup))
  (if (= (% (calendar-absolute-from-gregorian date) 7) 5) ; Friday
      (let ((sunset (cadr (solar-sunrise-sunset date))))
        (if sunset
            (cons mark (format
                        "%s Sabbath candle lighting"
                        (apply 'solar-time-string
                               (cons (- (car sunset)
                                        (/ diary-hebrew-sabbath-candles-minutes
                                           60.0))
                                     (cdr sunset)))))))))