Function: calendar-french-to-absolute
calendar-french-to-absolute is a byte-compiled function defined in
cal-french.el.gz.
Signature
(calendar-french-to-absolute DATE)
Documentation
Compute absolute date from French Revolutionary date DATE.
The absolute date is the number of days elapsed since the (imaginary) Gregorian date Sunday, December 31, 1 BC.
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/cal-french.el.gz
(defun calendar-french-to-absolute (date)
"Compute absolute date from French Revolutionary date DATE.
The absolute date is the number of days elapsed since the (imaginary)
Gregorian date Sunday, December 31, 1 BC."
(let ((month (calendar-extract-month date))
(day (calendar-extract-day date))
(year (calendar-extract-year date)))
(+ (* 365 (1- year)) ; days in prior years
;; Leap days in prior years.
(if (< year 20)
(/ year 4) ; actual and anticipated practice (years 3, 7, 11, 15)
;; Romme's proposed rule (using the Principle of Inclusion/Exclusion).
(+ (/ (1- year) 4) ; luckily, there were 4 leap years before year 20
(- (/ (1- year) 100))
(/ (1- year) 400)
(- (/ (1- year) 4000))))
(* 30 (1- month)) ; days in prior months this year
day ; days so far this month
(1- calendar-french-epoch)))) ; days before start of calendar