Skip to main content

31 The Calendar and the Diary

Emacs provides the functions of a desk calendar, with a diary of planned or past events. It also has facilities for managing your appointments, and keeping track of how much time you spend working on certain projects.

To enter the calendar, type M-x calendar. This displays a three-month calendar centered on the current month, with point on the current date. With a numeric argument, as in C-u M-x calendar, it prompts you for the month and year to be the center of the three-month calendar. The calendar uses its own buffer, whose major mode is Calendar mode.

mouse-3 in the calendar brings up a menu of operations on a particular date; mouse-2 brings up a menu of commonly used calendar features that are independent of any particular date. To exit the calendar, type q.

• Calendar Motion  Moving through the calendar; selecting a date.
• Scroll Calendar  Bringing earlier or later months onto the screen.
• Counting Days  How many days are there between two dates?
• General Calendar  Exiting or recomputing the calendar.
• Writing Calendar Files  Writing calendars to files of various formats.
• Holidays  Displaying dates of holidays.
• Sunrise/Sunset  Displaying local times of sunrise and sunset.
• Lunar Phases  Displaying phases of the moon.
• Other Calendars  Converting dates to other calendar systems.
• Diary  Displaying events from your diary.
• Daylight Saving  How to specify when daylight saving time is active.
• Time Intervals  Keeping track of time intervals.
• Advanced Calendar/Diary Usage  Advanced Calendar/Diary customization.