Documentation
Commentary
This collection of functions implements a calendar window. It generates a calendar for the current month, together with the previous and coming months, or for any other three-month period. The calendar can be scrolled forward and backward in the window to show months in the past or future; the cursor can move forward and backward by days, weeks, or months, making it possible, for instance, to jump to the date a specified number of days, weeks, or months from the date under the cursor. The user can display a list of holidays and other notable days for the period shown; the notable days can be marked on the calendar, if desired. The user can also specify that dates having corresponding diary entries (in a file that the user specifies) be marked; the diary entries for any date can be viewed in a separate window. The diary and the notable days can be viewed independently of the calendar. Dates can be translated from the (usual) Gregorian calendar to the day of the year/days remaining in year, to the ISO commercial calendar, to the Julian (old style) calendar, to the Hebrew calendar, to the Islamic calendar, to the Bahá’í calendar, to the French Revolutionary calendar, to the Mayan calendar, to the Chinese calendar, to the Coptic calendar, to the Ethiopic calendar, and to the astronomical (Julian) day number. Times of sunrise/sunset can be displayed, as can the phases of the moon. Appointment notification for diary entries is available. Calendar printing via LaTeX is available. The following files are part of the calendar/diary code: appt.el Appointment notification cal-bahai.el Bahá’í calendar cal-china.el Chinese calendar cal-coptic.el Coptic/Ethiopic calendars cal-dst.el Daylight saving time rules cal-french.el French revolutionary calendar cal-hebrew.el Hebrew calendar cal-html.el Calendars in HTML cal-islam.el Islamic calendar cal-iso.el ISO calendar cal-julian.el Julian/astronomical calendars cal-mayan.el Mayan calendars cal-menu.el Menu support cal-move.el Movement in the calendar cal-persia.el Persian calendar cal-tex.el Calendars in LaTeX cal-x.el Dedicated frame functions calendar.el This file diary-lib.el Diary functions holidays.el Holiday functions lunar.el Phases of the moon solar.el Sunrise/sunset, equinoxes/solstices Technical details of all the calendrical calculations can be found in "Calendrical Calculations: The Ultimate Edition" by Edward M. Reingold and Nachum Dershowitz, Cambridge University Press (2018). An earlier version of the technical details appeared in "Calendrical Calculations" by Nachum Dershowitz and Edward M. Reingold, Software--Practice and Experience, Volume 20, Number 9 (September, 1990), pages 899-928 <https://doi.org/10.1002/spe.4380200905> <https://pdfs.semanticscholar.org/83b1/14f570002a7a8e1d4e3730cd0e4cdbcad212.pdf>, and in "Calendrical Calculations, Part II: Three Historical Calendars" by E. M. Reingold, N. Dershowitz, and S. M. Clamen, Software--Practice and Experience, Volume 23, Number 4 (April, 1993), pages 383-404 <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 on the Gregorian calendar (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). This representation is also useful for certain calculations; e.g. `calendar-day-of-week' is simply the absolute representation modulo 7, because December 31, 1BC is a Sunday. A note on free variables: The calendar passes around a few dynamically bound variables, which unfortunately have rather common names. They are meant to be available for external functions, so the names can't be changed. displayed-month, displayed-year: bound in calendar-generate, the central month of the 3 month calendar window original-date, number: bound in diary-list-entries, the arguments with which that function was called. date, entry: bound in diary-list-sexp-entries (qv) Bound in diary-list-entries: diary-entries-list: use in d-l, appt.el, and by diary-add-to-list diary-saved-point: only used in diary-lib.el, passed to the display func date-string: only used in diary-lib.el list-only: don't modify the diary-buffer, just return a list of entries file-glob-attrs: yuck
Requires
Dependencies
Consumers
Reverse Dependencies
- blorg
- cal-catholic
- cal-desk-calendar
- comics
- diary-mode
- elserv
- lunar-mode-line
- pilot
- planner
- records
- xtide
- icalendar
- remember
- cal-china-x
- calendar-norway
- calfw
- clmemo
- emacspeak
- esv
- german-holidays
- hyperbole
- mew-ical
- netherlands-holidays
- suomalainen-kalenteri
- ukrainian-holidays
- weather-metno
- calendar+
- russian-holidays
- hledger-mode
- korean-holidays
- ebdb
- mu4e
- celestial-mode-line
- elcontext
- taskpaper-mode
- belarus-holidays
- mexican-holidays
- nz-holidays
- sv-kalender-namnsdagar
- org-shoplist
- brazilian-holidays
- metrics-tracker
- swiss-holidays
- org-treescope
- muse
- excorporate
- crossword
- nikki
- orthodox-christian-new-calendar-holidays
- org
- nano-agenda
- finito
- gkroam
- org-reverse-datetree
- xit-mode
- latvian-holidays
- spanish-holidays
- gnosis
- org-contrib
- casual
- org-node
- hindu-calendar
- russian-calendar
- romanian-holidays
- rec-mode
- denote-journal
- polish-holidays
- australia-holidays
- awqat
- iso-date
- life-calendar
- vulpea-journal
- org-window-habit
- taskjuggler-mode
- org-mcp