Function: calendar-leap-year-p
calendar-leap-year-p is a byte-compiled function defined in
calendar.el.gz.
Signature
(calendar-leap-year-p YEAR)
Documentation
Return t if YEAR is a Gregorian leap year.
A negative year is interpreted as BC; -1 being 1 BC, and so on.
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/calendar.el.gz
(defsubst calendar-leap-year-p (year)
"Return t if YEAR is a Gregorian leap year.
A negative year is interpreted as BC; -1 being 1 BC, and so on."
;; 1 BC = 0 AD, 2 BC acts like 1 AD, etc.
(if (< year 0) (setq year (1- (abs year))))
(and (zerop (% year 4))
(or (not (zerop (% year 100)))
(zerop (% year 400)))))