1CAL(P) POSIX Programmer's Manual CAL(P)
2
3
4
6 cal - print a calendar
7
9 cal [[month] year ]
10
12 The cal utility shall write a calendar to standard output using the
13 Julian calendar for dates from January 1, 1 through September 2, 1752
14 and the Gregorian calendar for dates from September 14, 1752 through
15 December 31, 9999 as though the Gregorian calendar had been adopted on
16 September 14, 1752.
17
19 None.
20
22 The following operands shall be supported:
23
24 month Specify the month to be displayed, represented as a decimal
25 integer from 1 (January) to 12 (December). The default shall be
26 the current month.
27
28 year Specify the year for which the calendar is displayed, repre‐
29 sented as a decimal integer from 1 to 9999. The default shall be
30 the current year.
31
32
34 Not used.
35
37 None.
38
40 The following environment variables shall affect the execution of cal:
41
42 LANG Provide a default value for the internationalization variables
43 that are unset or null. (See the Base Definitions volume of
44 IEEE Std 1003.1-2001, Section 8.2, Internationalization Vari‐
45 ables for the precedence of internationalization variables used
46 to determine the values of locale categories.)
47
48 LC_ALL If set to a non-empty string value, override the values of all
49 the other internationalization variables.
50
51 LC_CTYPE
52 Determine the locale for the interpretation of sequences of
53 bytes of text data as characters (for example, single-byte as
54 opposed to multi-byte characters in arguments).
55
56 LC_MESSAGES
57 Determine the locale that should be used to affect the format
58 and contents of diagnostic messages written to standard error,
59 and informative messages written to standard output.
60
61 LC_TIME
62 Determine the format and contents of the calendar.
63
64 NLSPATH
65 Determine the location of message catalogs for the processing of
66 LC_MESSAGES .
67
68 TZ Determine the timezone used to calculate the value of the cur‐
69 rent month.
70
71
73 Default.
74
76 The standard output shall be used to display the calendar, in an
77 unspecified format.
78
80 The standard error shall be used only for diagnostic messages.
81
83 None.
84
86 None.
87
89 The following exit values shall be returned:
90
91 0 Successful completion.
92
93 >0 An error occurred.
94
95
97 Default.
98
99 The following sections are informative.
100
102 Note that:
103
104
105 cal 83
106
107 refers to A.D. 83, not 1983.
108
110 None.
111
113 None.
114
116 A future version of IEEE Std 1003.1-2001 may support locale-specific
117 recognition of the date of adoption of the Gregorian calendar.
118
120 None.
121
123 Portions of this text are reprinted and reproduced in electronic form
124 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
125 -- Portable Operating System Interface (POSIX), The Open Group Base
126 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
127 Electrical and Electronics Engineers, Inc and The Open Group. In the
128 event of any discrepancy between this version and the original IEEE and
129 The Open Group Standard, the original IEEE and The Open Group Standard
130 is the referee document. The original Standard can be obtained online
131 at http://www.opengroup.org/unix/online.html .
132
133
134
135IEEE/The Open Group 2003 CAL(P)