From 4bf17cf59f7f8cc29ca79b03649037416aab1901 Mon Sep 17 00:00:00 2001 From: Richard Lawrence Date: Mon, 16 Dec 2024 20:46:34 +0100 Subject: [PATCH] Document representation of dates in calendar.el * lisp/calendar/calendar.el: Add a comment in file header explaining how dates are represented. --- lisp/calendar/calendar.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 60d8fdd6aee..36d64a2b11c 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -90,6 +90,16 @@ ;; ;; +;; A note on how dates are represented: + +;; The standard format for a (Gregorian) calendar date in this file is a +;; list of integers (MONTH DAY YEAR) -- see the functions +;; `calendar-extract-year', `calendar-extract-month', and +;; `calendar-extract-day'. Internally it also uses an "absolute" format +;; which is an integer number of days since December 31, 1BC (see +;; e.g. `calendar-absolute-from-gregorian'), and converts between +;; different calendar scales by converting to and from the absolute +;; format (see e.g. `calendar-iso-from-absolute' in cal-iso.el). ;; A note on free variables: -- 2.39.5