Variable: calendar-holidays
calendar-holidays is a customizable variable defined in
holidays.el.gz.
Value
Large value
((holiday-fixed 1 1 "New Year's Day")
(holiday-float 1 1 3 "Martin Luther King Day")
(holiday-fixed 2 2 "Groundhog Day")
(holiday-fixed 2 14 "Valentine's Day")
(holiday-float 2 1 3 "President's Day")
(holiday-fixed 3 17 "St. Patrick's Day")
(holiday-fixed 4 1 "April Fools' Day")
(holiday-float 5 0 2 "Mother's Day")
(holiday-float 5 1 -1 "Memorial Day")
(holiday-fixed 6 14 "Flag Day")
(holiday-float 6 0 3 "Father's Day")
(holiday-fixed 7 4 "Independence Day")
(holiday-float 9 1 1 "Labor Day")
(holiday-float 10 1 2 "Columbus Day")
(holiday-fixed 10 31 "Halloween")
(holiday-fixed 11 11 "Veteran's Day")
(holiday-float 11 4 4 "Thanksgiving")
(holiday-easter-etc)
(holiday-fixed 12 25 "Christmas")
(if calendar-christian-all-holidays-flag
(append
(holiday-fixed 1 6 "Epiphany")
(holiday-julian 12 25 "Christmas (Julian calendar)")
(holiday-greek-orthodox-easter)
(holiday-fixed 8 15 "Assumption")
(holiday-advent 0 "Advent")))
(holiday-hebrew-passover)
(holiday-hebrew-rosh-hashanah)
(holiday-hebrew-hanukkah)
(if calendar-hebrew-all-holidays-flag
(append
(holiday-hebrew-tisha-b-av)
(holiday-hebrew-misc)))
(holiday-islamic-new-year)
(holiday-islamic 9 1 "Ramadan Begins")
(if calendar-islamic-all-holidays-flag
(append
(holiday-islamic 1 10 "Ashura")
(holiday-islamic 3 12 "Mulad-al-Nabi")
(holiday-islamic 7 26 "Shab-e-Mi'raj")
(holiday-islamic 8 15 "Shab-e-Bara't")
(holiday-islamic 9 27 "Shab-e Qadr")
(holiday-islamic 10 1 "Id-al-Fitr")
(holiday-islamic 12 10 "Id-al-Adha")))
(holiday-bahai-new-year)
(holiday-bahai-ridvan)
(holiday-fixed 5 23 "Declaration of the Báb")
(holiday-fixed 5 29 "Ascension of Bahá’u’lláh")
(holiday-fixed 7 9 "Martyrdom of the Báb")
(holiday-fixed 10 20 "Birth of the Báb")
(holiday-fixed 11 12 "Birth of Bahá’u’lláh")
(if calendar-bahai-all-holidays-flag
(append
(holiday-fixed 11 26 "Day of the Covenant")
(holiday-fixed 11 28 "Ascension of `Abdu’l-Bahá")))
(holiday-chinese-new-year)
(if calendar-chinese-all-holidays-flag
(append
(holiday-chinese 1 15 "Lantern Festival")
(holiday-chinese-qingming)
(holiday-chinese 5 5 "Dragon Boat Festival")
(holiday-chinese 7 7 "Double Seventh Festival")
(holiday-chinese 8 15 "Mid-Autumn Festival")
(holiday-chinese 9 9 "Double Ninth Festival")
(holiday-chinese-winter-solstice)))
(solar-equinoxes-solstices)
(holiday-sexp calendar-daylight-savings-starts
(format "Daylight Saving Time Begins %s"
(solar-time-string
(/ calendar-daylight-savings-starts-time
(float 60))
calendar-standard-time-zone-name)))
(holiday-sexp calendar-daylight-savings-ends
(format "Daylight Saving Time Ends %s"
(solar-time-string
(/ calendar-daylight-savings-ends-time
(float 60))
calendar-daylight-time-zone-name))))
Documentation
List of notable days for the command M-x holidays (holidays).
Additional holidays are easy to add to the list, just put them in the
list holiday-other-holidays in your init file. Similarly, by setting
any of holiday-general-holidays, holiday-local-holidays,
holiday-christian-holidays, holiday-hebrew-holidays,
holiday-islamic-holidays, holiday-bahai-holidays,
holiday-oriental-holidays, or holiday-solar-holidays to nil in your
init file, you can eliminate unwanted categories of holidays.
The aforementioned variables control the holiday choices offered
by the function holiday-list when it is called interactively.
They also initialize the default value of calendar-holidays,
which is the default list of holidays used by the function
holiday-list in the non-interactive case. Note that these
variables have no effect on calendar-holidays after it has been
set (e.g. after the calendar is loaded). In that case, customize
calendar-holidays directly.
The intention is that (in the US) holiday-local-holidays be set in
site-init.el and holiday-other-holidays be set by the user.
Entries on the list are expressions that return (possibly empty) lists of
items of the form ((month day year) string) of a holiday in the
three-month period centered around displayed-month of displayed-year.
Several basic functions are provided for this purpose:
(holiday-fixed MONTH DAY STRING) is a fixed date on the Gregorian calendar
(holiday-float MONTH DAYNAME K STRING &optional DAY) is the Kth DAYNAME
(0 for Sunday, etc.) after/before Gregorian
MONTH DAY. K<0 means count back from the end
of the month. Optional DAY defaults to 1 if
K>0, and MONTH's last day otherwise.
(holiday-hebrew MONTH DAY STRING) a fixed date on the Hebrew calendar
(holiday-islamic MONTH DAY STRING) a fixed date on the Islamic calendar
(holiday-bahai MONTH DAY STRING) a fixed date on the Bahá’í calendar
(holiday-julian MONTH DAY STRING) a fixed date on the Julian calendar
(holiday-sexp SEXP STRING) SEXP is a Gregorian-date-valued expression
in the variable year; if it evaluates to
a visible date, that's the holiday; if it
evaluates to nil, there's no holiday. STRING
is an expression in the variable date.
For example, to add Bastille Day, celebrated in France on July 14, add
(holiday-fixed 7 14 "Bastille Day")
to the list. To add Hurricane Supplication Day, celebrated in the Virgin Islands on the fourth Monday in July, add
(holiday-float 7 1 4 "Hurricane Supplication Day")
to the list (the last Monday would be specified with -1 instead of 4).
To add the last day of Hanukkah to the list, use
(holiday-hebrew 10 2 "Last day of Hanukkah")
since the Hebrew months are numbered with 1 starting from Nisan. To add the Islamic feast celebrating Mohammed's birthday, use
(holiday-islamic 3 12 "Mohammed's Birthday")
since the Islamic months are numbered from 1 starting with Muharram. To add an entry for the Bahá’í festival of Ridvan, use
(holiday-bahai 2 13 "Festival of Ridvan")
since the Bahá’í months are numbered from 1 starting with Bahá. To add Thomas Jefferson's birthday, April 2, 1743 (Julian), use
(holiday-julian 4 2 "Jefferson's Birthday")
To include a holiday conditionally, use the sexp form or a conditional. For example, to include American presidential elections, which occur on the first Tuesday after the first Monday in November of years divisible by 4, add
(holiday-sexp
'(if (zerop (% year 4))
(calendar-gregorian-from-absolute
(1+ (calendar-dayname-on-or-before
1 (+ 6 (calendar-absolute-from-gregorian
(list 11 1 year)))))))
"US Presidential Election")
or
(if (zerop (% displayed-year 4))
(holiday-fixed 11
(calendar-extract-day
(calendar-gregorian-from-absolute
(1+ (calendar-dayname-on-or-before
1 (+ 6 (calendar-absolute-from-gregorian
(list 11 1 displayed-year)))))))
"US Presidential Election"))
to the list. To include the phases of the moon, add
(lunar-phases)
to the holiday list, where lunar-phases is an Emacs Lisp function that
you've written to return a (possibly empty) list of the relevant VISIBLE dates
with descriptive strings such as
(((2 6 1989) "New Moon") ((2 12 1989) "First Quarter Moon") ... ).
Probably introduced at or before Emacs version 19.20.
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/holidays.el.gz
;; This one should not be autoloaded, else .emacs changes of
;; holiday-general-holidays etc have no effect.
;; FIXME should have some :set-after.
(defcustom calendar-holidays
(append holiday-general-holidays holiday-local-holidays
holiday-other-holidays holiday-christian-holidays
holiday-hebrew-holidays holiday-islamic-holidays
holiday-bahai-holidays holiday-oriental-holidays
holiday-solar-holidays)
"List of notable days for the command \\[holidays].
Additional holidays are easy to add to the list, just put them in the
list `holiday-other-holidays' in your init file. Similarly, by setting
any of `holiday-general-holidays', `holiday-local-holidays',
`holiday-christian-holidays', `holiday-hebrew-holidays',
`holiday-islamic-holidays', `holiday-bahai-holidays',
`holiday-oriental-holidays', or `holiday-solar-holidays' to nil in your
init file, you can eliminate unwanted categories of holidays.
The aforementioned variables control the holiday choices offered
by the function `holiday-list' when it is called interactively.
They also initialize the default value of `calendar-holidays',
which is the default list of holidays used by the function
`holiday-list' in the non-interactive case. Note that these
variables have no effect on `calendar-holidays' after it has been
set (e.g. after the calendar is loaded). In that case, customize
`calendar-holidays' directly.
The intention is that (in the US) `holiday-local-holidays' be set in
site-init.el and `holiday-other-holidays' be set by the user.
Entries on the list are expressions that return (possibly empty) lists of
items of the form ((month day year) string) of a holiday in the
three-month period centered around `displayed-month' of `displayed-year'.
Several basic functions are provided for this purpose:
(holiday-fixed MONTH DAY STRING) is a fixed date on the Gregorian calendar
(holiday-float MONTH DAYNAME K STRING &optional DAY) is the Kth DAYNAME
(0 for Sunday, etc.) after/before Gregorian
MONTH DAY. K<0 means count back from the end
of the month. Optional DAY defaults to 1 if
K>0, and MONTH's last day otherwise.
(holiday-hebrew MONTH DAY STRING) a fixed date on the Hebrew calendar
(holiday-islamic MONTH DAY STRING) a fixed date on the Islamic calendar
(holiday-bahai MONTH DAY STRING) a fixed date on the Bahá’í calendar
(holiday-julian MONTH DAY STRING) a fixed date on the Julian calendar
(holiday-sexp SEXP STRING) SEXP is a Gregorian-date-valued expression
in the variable `year'; if it evaluates to
a visible date, that's the holiday; if it
evaluates to nil, there's no holiday. STRING
is an expression in the variable `date'.
For example, to add Bastille Day, celebrated in France on July 14, add
(holiday-fixed 7 14 \"Bastille Day\")
to the list. To add Hurricane Supplication Day, celebrated in the Virgin
Islands on the fourth Monday in July, add
(holiday-float 7 1 4 \"Hurricane Supplication Day\")
to the list (the last Monday would be specified with `-1' instead of `4').
To add the last day of Hanukkah to the list, use
(holiday-hebrew 10 2 \"Last day of Hanukkah\")
since the Hebrew months are numbered with 1 starting from Nisan.
To add the Islamic feast celebrating Mohammed's birthday, use
(holiday-islamic 3 12 \"Mohammed's Birthday\")
since the Islamic months are numbered from 1 starting with Muharram.
To add an entry for the Bahá’í festival of Ridvan, use
(holiday-bahai 2 13 \"Festival of Ridvan\")
since the Bahá’í months are numbered from 1 starting with Bahá.
To add Thomas Jefferson's birthday, April 2, 1743 (Julian), use
(holiday-julian 4 2 \"Jefferson's Birthday\")
To include a holiday conditionally, use the sexp form or a conditional. For
example, to include American presidential elections, which occur on the first
Tuesday after the first Monday in November of years divisible by 4, add
(holiday-sexp
\\='(if (zerop (% year 4))
(calendar-gregorian-from-absolute
(1+ (calendar-dayname-on-or-before
1 (+ 6 (calendar-absolute-from-gregorian
(list 11 1 year)))))))
\"US Presidential Election\")
or
(if (zerop (% displayed-year 4))
(holiday-fixed 11
(calendar-extract-day
(calendar-gregorian-from-absolute
(1+ (calendar-dayname-on-or-before
1 (+ 6 (calendar-absolute-from-gregorian
(list 11 1 displayed-year)))))))
\"US Presidential Election\"))
to the list. To include the phases of the moon, add
(lunar-phases)
to the holiday list, where `lunar-phases' is an Emacs Lisp function that
you've written to return a (possibly empty) list of the relevant VISIBLE dates
with descriptive strings such as
(((2 6 1989) \"New Moon\") ((2 12 1989) \"First Quarter Moon\") ... )."
:type 'sexp)