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