logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

cal.1p (4948B)


  1. '\" et
  2. .TH CAL "1P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. cal
  12. \(em print a calendar
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. cal \fB[[\fImonth\fB] \fIyear\fB]\fR
  17. .fi
  18. .SH DESCRIPTION
  19. The
  20. .IR cal
  21. utility shall write a calendar to standard output using the Julian
  22. calendar for dates from January 1, 1 through September 2, 1752 and the
  23. Gregorian calendar for dates from September 14, 1752 through December
  24. 31, 9999 as though the Gregorian calendar had been adopted on September
  25. 14, 1752.
  26. .P
  27. If no operands are given,
  28. .IR cal
  29. shall produce a one-month calendar for the current month in the
  30. current year. If only the
  31. .IR year
  32. operand is given,
  33. .IR cal
  34. shall produce a calendar for all twelve months in the given calendar
  35. year. If both
  36. .IR month
  37. and
  38. .IR year
  39. operands are given,
  40. .IR cal
  41. shall produce a one-month calendar for the given month in the given year.
  42. .SH OPTIONS
  43. None.
  44. .SH OPERANDS
  45. The following operands shall be supported:
  46. .IP "\fImonth\fR" 10
  47. Specify the month to be displayed, represented as a decimal integer
  48. from 1 (January) to 12 (December).
  49. .IP "\fIyear\fR" 10
  50. Specify the year for which the calendar is displayed, represented as a
  51. decimal integer from 1 to 9999.
  52. .SH STDIN
  53. Not used.
  54. .SH "INPUT FILES"
  55. None.
  56. .SH "ENVIRONMENT VARIABLES"
  57. The following environment variables shall affect the execution of
  58. .IR cal :
  59. .IP "\fILANG\fP" 10
  60. Provide a default value for the internationalization variables that are
  61. unset or null. (See the Base Definitions volume of POSIX.1\(hy2017,
  62. .IR "Section 8.2" ", " "Internationalization Variables"
  63. for the precedence of internationalization variables used to determine
  64. the values of locale categories.)
  65. .IP "\fILC_ALL\fP" 10
  66. If set to a non-empty string value, override the values of all the
  67. other internationalization variables.
  68. .IP "\fILC_CTYPE\fP" 10
  69. Determine the locale for the interpretation of sequences of bytes of
  70. text data as characters (for example, single-byte as opposed to
  71. multi-byte characters in arguments).
  72. .IP "\fILC_MESSAGES\fP" 10
  73. .br
  74. Determine the locale that should be used to affect the format and
  75. contents of diagnostic messages written to standard error, and
  76. informative messages written to standard output.
  77. .IP "\fILC_TIME\fP" 10
  78. Determine the format and contents of the calendar.
  79. .IP "\fINLSPATH\fP" 10
  80. Determine the location of message catalogs for the processing of
  81. .IR LC_MESSAGES .
  82. .IP "\fITZ\fP" 10
  83. Determine the timezone used to calculate the value of the current
  84. month.
  85. .SH "ASYNCHRONOUS EVENTS"
  86. Default.
  87. .SH STDOUT
  88. The standard output shall be used to display the calendar, in an
  89. unspecified format.
  90. .SH STDERR
  91. The standard error shall be used only for diagnostic messages.
  92. .SH "OUTPUT FILES"
  93. None.
  94. .SH "EXTENDED DESCRIPTION"
  95. None.
  96. .SH "EXIT STATUS"
  97. The following exit values shall be returned:
  98. .IP "\00" 6
  99. Successful completion.
  100. .IP >0 6
  101. An error occurred.
  102. .SH "CONSEQUENCES OF ERRORS"
  103. Default.
  104. .LP
  105. .IR "The following sections are informative."
  106. .SH "APPLICATION USAGE"
  107. Note that:
  108. .sp
  109. .RS 4
  110. .nf
  111. cal 83
  112. .fi
  113. .P
  114. .RE
  115. .P
  116. refers to A.D. 83, not 1983.
  117. .SH EXAMPLES
  118. None.
  119. .SH RATIONALE
  120. Earlier versions of this standard incorrectly required that the command:
  121. .sp
  122. .RS 4
  123. .nf
  124. cal 2000
  125. .fi
  126. .P
  127. .RE
  128. .P
  129. write a one-month calendar for the current calendar month (no matter what
  130. the current year is) in the year 2000 to standard output. This did not
  131. match historic practice in any known version of the
  132. .IR cal
  133. utility. The description has been updated to match historic practice.
  134. When only the
  135. .IR year
  136. operand is given,
  137. .IR cal
  138. writes a twelve-month calendar for the specified year.
  139. .SH "FUTURE DIRECTIONS"
  140. A future version of this standard may support locale-specific
  141. recognition of the date of adoption of the Gregorian calendar.
  142. .SH "SEE ALSO"
  143. The Base Definitions volume of POSIX.1\(hy2017,
  144. .IR "Chapter 8" ", " "Environment Variables"
  145. .\"
  146. .SH COPYRIGHT
  147. Portions of this text are reprinted and reproduced in electronic form
  148. from IEEE Std 1003.1-2017, Standard for Information Technology
  149. -- Portable Operating System Interface (POSIX), The Open Group Base
  150. Specifications Issue 7, 2018 Edition,
  151. Copyright (C) 2018 by the Institute of
  152. Electrical and Electronics Engineers, Inc and The Open Group.
  153. In the event of any discrepancy between this version and the original IEEE and
  154. The Open Group Standard, the original IEEE and The Open Group Standard
  155. is the referee document. The original Standard can be obtained online at
  156. http://www.opengroup.org/unix/online.html .
  157. .PP
  158. Any typographical or formatting errors that appear
  159. in this page are most likely
  160. to have been introduced during the conversion of the source files to
  161. man page format. To report such errors, see
  162. https://www.kernel.org/doc/man-pages/reporting_bugs.html .