CAL(1POSIX)
π CAL(1POSIX) π
okay bestie, welcome to cal β straight out of the POSIX Programmer's Manual, no cap β¨
πΈ PROLOG πΈ
so like, quick lil heads up before we get into it: this manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (so pls consult the corresponding Linux manual page for the deets on Linux behavior), or β and I cannot stress this enough β the interface might not even be implemented on Linux at all. π
β¨ NAME β¨
cal β print a calendar ποΈ
π SYNOPSIS π
cal [[month] year]
π DESCRIPTION π
okay so the cal utility shall write a calendar to standard output, and the way it does it is so specific: it uses the Julian calendar for dates from January 1, 1 through September 2, 1752, and the Gregorian calendar for dates from September 14, 1752 through December 31, 9999 β as though the Gregorian calendar had been adopted on September 14, 1752. iconic behavior tbh.
now, the vibes change depending on what operands you hand it:
- no operands?
calshall produce a one-month calendar for the current month in the current year. - just the year operand?
calshall produce a calendar for all twelve months in the given calendar year. - both month and year?
calshall produce a one-month calendar for the given month in the given year.
π OPTIONS π
None. π literally none. it's giving minimal. it's giving low maintenance. periodt.
π¦ OPERANDS π¦
The following operands shall be supported:
monthβ Specify the month to be displayed, represented as a decimal integer from1(January) to12(December).yearβ Specify the year for which the calendar is displayed, represented as a decimal integer from1to9999.
π STDIN π
Not used. she doesn't need it bestie, she's independent. π
π INPUT FILES π
None.
β ENVIRONMENT VARIABLES β
The following environment variables shall affect the execution of cal:
LANGβ Provide a default value for the internationalization variables that are unset or null. (See the Base Definitions volume of POSIX.1β2017, Section 8.2, Internationalization Variables for the precedence of internationalization variables used to determine the values of locale categories.)LC_ALLβ If set to a non-empty string value, override the values of all the other internationalization variables.LC_CTYPEβ Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multi-byte characters in arguments).LC_MESSAGESβ Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error, and informative messages written to standard output.LC_TIMEβ Determine the format and contents of the calendar. ποΈβ¨NLSPATHβ Determine the location of message catalogs for the processing ofLC_MESSAGES.TZβ Determine the timezone used to calculate the value of the current month.
π§ ASYNCHRONOUS EVENTS π§
Default.
π STDOUT π
The standard output shall be used to display the calendar, in an unspecified format. yeah, she's mysterious like that. the format is not our business. π
π STDERR π
The standard error shall be used only for diagnostic messages.
πΈ OUTPUT FILES πΈ
None.
π EXTENDED DESCRIPTION π
None. nothing extra. she said what she said.
π₯ EXIT STATUS π₯
The following exit values shall be returned:
0β Successful completion. π>0β An error occurred. π
π CONSEQUENCES OF ERRORS π
Default.
The following sections are informative.
π APPLICATION USAGE π
Note that:
cal 83
refers to A.D. 83, not 1983. bestie please. do not embarrass yourself. π
π EXAMPLES π
None.
π§ RATIONALE π§
okay so story time π β earlier versions of this standard incorrectly required that the command:
cal 2000
write a one-month calendar for the current calendar month (no matter what the current year is) in the year 2000 to standard output. and likeβ¦ that did not match historic practice in any known version of the cal utility. not a single one. π
so the description has been updated to match historic practice: when only the year operand is given, cal writes a twelve-month calendar for the specified year. slay. β
π¦ FUTURE DIRECTIONS π¦
A future version of this standard may support locale-specific recognition of the date of adoption of the Gregorian calendar. we'll see bestie, we'll see. π
π SEE ALSO π
The Base Definitions volume of POSIX.1β2017, Chapter 8, Environment Variables
βοΈ COPYRIGHT βοΈ
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html .
Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
and that's the whole page bestie!! π«Ά this one's from IEEE/The Open Group, dated 2017 β mwah, thank you for coming to my TED talk, go print a calendar, ily πβ¨π
π¦ where this page comes from
- debian bookworm: manpages-posix 2017a-2 Β· Other
- debian trixie: manpages-posix 2017a-2 Β· Other
- ubuntu jammy: manpages-posix 2017a-2 Β· Other
- ubuntu noble: manpages-posix 2017a-2 Β· Other
- ubuntu resolute: manpages-posix 2017a-2build1 Β· Other
- ubuntu stonking: manpages-posix 2017a-2.1 Β· Other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms