calendar — Display all current appointments
Format
calendar [–]
The calendar utility is fully supported for compatibility with older UNIX systems. However, because it is no longer supported by POSIX.2 IEEE standard 1003.2-1992, this utility should be avoided for applications intended to be portable to other UNIX-branded systems.
Description
If you do not specify any options, calendar displays
all current appointments on standard output (stdout). It searches
the file calendar in the current directory, looking for lines
that match either today's date or tomorrow's date. On Friday, Saturday,
or Sunday, tomorrow extends through to Monday. Each appointment
must fit on a single line, with the date formatted as one of:
January 27
1/27
jan 27
The name of the month can be abbreviated to three letters. Also, the case is not significant and the month can be given numerically.
Options
- –
- Searches the RACF® data base to find user IDs. calendar uses the mailx command (or, alternatively, the command named in the MAILER environment variable) to send mail to the corresponding user for any appointments that are found to be current. Because calendar cannot determine each user's locale, it runs in the POSIX locale when this option is used; otherwise it runs in the user's locale, processing data in single-byte mode.
Examples
If today is Friday April 7th and
the following calendar file is found in the current directory:
tue mar 7 1:00 pm dentist
Sat April 8 Trip to the zoo
mon april 10 3:30 pm job interview
4/11 vacation starts
calendar prints
the following: Sat April 8 Trip to the zoo
mon april 10 3:30 pm job interview
Environment variables
calendar uses
the following environment variable:
- MAILER
- Contains the name of the command that calendar uses to send mail. If this variable is not set, calendar uses /bin/mail as the default mail command.
Files
calendar uses
the following file:
- calendar
- File used in the current directory, or user's home directory.
Localization
calendar uses
the following localization environment variables:
- LANG
- LC_ALL
- LC_MESSAGES
- NLSPATH
See Localization for more information.
Exit values
- 0
- Successful completion
- 1
- Failure due to any of the following:
- An incorrect command-line argument
- An inability to open the calendar file
Portability
X/Open Portability Guide, UNIX systems
The MAILER environment variable is an extension to traditional implementations of calendar.
Related information
mailx