Document representation of dates in calendar.el

* lisp/calendar/calendar.el: Add a comment in file header
explaining how dates are represented.
This commit is contained in:
Richard Lawrence 2024-12-16 20:46:34 +01:00 committed by Eli Zaretskii
parent faaa13ec76
commit d8ffcf2fba

View file

@ -90,6 +90,16 @@
;; <https://doi.org/10.1002/spe.4380230404>
;; <http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.42.6421&rep=rep1&type=pdf>
;; 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: