CALENDAR(1)
๐ CALENDAR(1) โ the reminder service ๐
okay so bestie, welcome to calendar, the lil utility that remembers stuff so you don't have to. it's from the General Commands Manual section, and yes, it's giving "your mom's fridge calendar but make it Unix." let's get into it ๐๏ธโจ
๐ธ NAME ๐ธ
calendar โ reminder service
โจ SYNOPSIS โจ
calendar [-abw] [-A num] [-B num] [-l num] [-e num] [-f calendarfile]
[-t [[[cc]yy]mm]dd]
๐ฆ DESCRIPTION ๐ฆ
so like, the calendar utility goes and checks the current directory โ or whatever directory you told it about with the CALENDAR_DIR environment variable โ looking for a file literally named calendar, and then it prints out the lines that start with today's date or tomorrow's date. and on Fridays? it's feeling generous, so it shows you everything from Friday all the way through Monday. weekend mode unlocked ๐๐
๐ the options ๐
-A numโ prints lines from today and the nextnumdays (forward, future vibes). defaults to one (same as-l).-aโ processes the "calendar" files of all users and mails the results to them. this one needs superuser privileges, so like, know your power before you use it.
โ ๏ธ fr fr, this requires superuser privileges. don't just yolo it.
-B numโ prints lines from today and the previousnumdays (backward, looking back, nostalgic era).-bโ enforces special date calculation mode for Cyrillic calendars.-l numโ prints lines from today and the nextnumdays (forward, future). defaults to one (same as-A).-e numโ prints lines from today and the nextnumdays, but only if today is Friday (forward, future). defaults to two, which makescalendarprint entries through the weekend on Fridays. slay.-f calendarfileโ usescalendarfileas the default calendar file. if that file isn't accessible, the system-wide default gets used instead.-t [[[cc]yy]mm]ddโ acts like the value you gave is "today" instead of using the actual current date. ifyyis specified butccis not, a value foryybetween69and99gives you accvalue of19. otherwise, accvalue of20is used. time travel but make it a flag ๐ฐ๏ธ-wโ prints the day of the week name in front of each event. cute AND informative.
so to handle calendars in your national code table, you can specify "LANG=<locale_name>" in the calendar file, as early as possible pls. and to handle national Easter names in the calendars, you can use "Easter=<national_name>" (for Catholic Easter) or "Paskha=<national_name>" (for Orthodox Easter).
there's also a special locale name: utf-8. specifying "LANG=utf-8" means the dates will be read using the C locale, and the descriptions will be encoded in UTF-8. this is usually used for the distributed calendar files. the "CALENDAR" variable can specify the style โ only Julian and Gregorian styles are currently supported. use "CALENDAR=" to return to the default (Gregorian).
to enforce special date calculation mode for Cyrillic calendars, you should specify "LANG=<local_name>" and "BODUN=<bodun_prefix>", where <local_name> can be ru_RU.UTF-8, uk_UA.UTF-8 or by_BY.UTF-8.
๐ก note that the locale is reset to the user's default for each new file that is read. this is so that locales from one file don't accidentally carry over into another file. no cross-contamination, we respect boundaries ๐
other lines should begin with a month and a day. they may be entered in almost any format, either numeric or as character strings. if the proper locale is set, national months and weekdays names can be used.
- a single asterisk (
*) matches every month. - a day without a month matches that day of every week.
- a month without a day matches the first of that month.
- two numbers default to the month followed by the day.
- lines with leading tabs default to the last entered date, which lets you do multiple line specifications for a single date.
"Easter"(may be followed by a positive or negative integer) is Easter for this year."Paskha"(may be followed by a positive or negative integer) is Orthodox Easter for this year.- weekdays may be followed by
"-4"..."+5"(aliases last, first, second, third, fourth) for moving events like"the last Monday in April".
by convention, dates followed by an asterisk (*) are not fixed, i.e., they change from year to year. it's giving chaotic but in a scheduled way.
day descriptions start after the first <tab> character in the line โ and if the line does not contain a <tab> character, it isn't printed out. periodt. if the first character in the line is a <tab> character, it's treated as the continuation of the previous description.
the calendar file is preprocessed by cpp(1), which allows the inclusion of shared files like company holidays or meetings. if the shared file isn't referenced by a full pathname, cpp(1) searches in the current (or home) directory first, and then in the directory /etc/calendar, and finally in /usr/share/calendar. empty lines and lines protected by the C commenting syntax (/* ... */) are ignored. ๐
some possible calendar entries (a \t sequence denotes a <tab> character):
LANG=C
Easter=Ostern
#include <calendar.usholiday>
#include <calendar.birthday>
6/15\tJune 15 (if ambiguous, will default to month/day).
Jun. 15\tJune 15.
15 June\tJune 15.
Thursday\tEvery Thursday.
June\tEvery June 1st.
15 *\t15th of every month.
May Sun+2\tsecond Sunday in May (Muttertag)
04/SunLast\tlast Sunday in April,
\tsummer time in Europe
Easter\tEaster
Ostern-2\tGood Friday (2 days before Easter)
Paskha\tOrthodox Easter
๐ FILES ๐
calendarโ File in current directory.~/.calendarโ Directory in the user's home directory (whichcalendarchanges into, if it exists).~/.calendar/calendarโ File to use if no calendar file exists in the current directory.~/.calendar/nomailโcalendarwill not send mail if this file exists.calendar.allโ International and national calendar files.calendar.birthdayโ Births and deaths of famous (and not-so-famous) people.calendar.canadaโ Canadian holidays.calendar.christianโ Christian holidays (should be updated yearly by the local system administrator so that roving holidays are set correctly for the current year).calendar.computerโ Days of special significance to computer people.calendar.croatianโ Croatian calendar.calendar.discordโ Discordian calendar (all rites reversed).calendar.fictionalโ Fantasy and fiction dates (mostly LOTR).calendar.frenchโ French calendar.calendar.germanโ German calendar.calendar.historyโ Miscellaneous history.calendar.holidayโ Other holidays (including the not-well-known, obscure, and really obscure).calendar.judaicโ Jewish holidays (should be updated yearly by the local system administrator so that roving holidays are set correctly for the current year).calendar.musicโ Musical events, births, and deaths (strongly oriented toward rock 'n' roll).calendar.nzโ New Zealand calendar.calendar.openbsdโ OpenBSD related events.calendar.paganโ Pagan holidays, celebrations and festivals.calendar.russianโ Russian calendar.calendar.spaceโ Cosmic history.calendar.ukโ UK calendar.calendar.ushistoryโ U.S. history.calendar.usholidayโ U.S. holidays.calendar.worldโ World wide calendar.
๐ SEE ALSO ๐
at(1), cal(1), cpp(1), mail(1), cron(8)
๐ STANDARDS ๐
ngl, the calendar program previously selected lines which had the correct date anywhere in the line. this is no longer true: the date is only recognized when it occurs at the beginning of a line. glow-up behavior honestly.
๐ COMPATIBILITY ๐
the calendar command will only display lines that use a <tab> character to separate the date and description, or that begin with a <tab>. this is different than in previous releases. evolution ๐
the Fl t flag argument syntax is from the original FreeBSD calendar program.
the -l and -e flags are Debian-specific enhancements. option -e used to be called -w in Debian, but this option is now used differently by upstream. also, the original calendar program did not accept 0 as an argument to the -A flag.
using utf-8 as a locale name is a Debian-specific enhancement.
๐ HISTORY ๐
A calendar command appeared in Version 7 AT&T UNIX. ancient. iconic. the blueprint. ๐
๐ BUGS ๐
calendar doesn't handle all Jewish holidays or moon phases. yeah. it's not perfect bestie, we know. ๐ญ
Debian ยท January 29, 2019
and that's the whole page babes ๐ซถ this came out of the Debian corner of the world, dated January 29, 2019. go schedule something cute ๐โจ
๐ฆ where this page comes from
- debian bookworm: calendar 12.1.8
- debian trixie: calendar 12.1.8
- ubuntu jammy: calendar 12.1.7+nmu3ubuntu2
- ubuntu noble: calendar 12.1.8
- ubuntu resolute: calendar 12.1.8build1
- ubuntu stonking: calendar 12.1.8build1
- Copyright (c) 1989, 1990, 1993 The Regents of the University of California. All rights reserved
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms