1CAL(P)                     POSIX Programmer's Manual                    CAL(P)
2
3
4

NAME

6       cal - print a calendar
7

SYNOPSIS

9       cal [[month] year ]
10

DESCRIPTION

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

OPTIONS

19       None.
20

OPERANDS

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

STDIN

34       Not used.
35

INPUT FILES

37       None.
38

ENVIRONMENT VARIABLES

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

ASYNCHRONOUS EVENTS

73       Default.
74

STDOUT

76       The standard output shall be  used  to  display  the  calendar,  in  an
77       unspecified format.
78

STDERR

80       The standard error shall be used only for diagnostic messages.
81

OUTPUT FILES

83       None.
84

EXTENDED DESCRIPTION

86       None.
87

EXIT STATUS

89       The following exit values shall be returned:
90
91        0     Successful completion.
92
93       >0     An error occurred.
94
95

CONSEQUENCES OF ERRORS

97       Default.
98
99       The following sections are informative.
100

APPLICATION USAGE

102       Note that:
103
104
105              cal 83
106
107       refers to A.D. 83, not 1983.
108

EXAMPLES

110       None.
111

RATIONALE

113       None.
114

FUTURE DIRECTIONS

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

SEE ALSO

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)
Impressum