CAL(1P)
π CAL(1P) β the POSIX Programmer's Manual, bestie edition π
okay so this is CAL(1P) from the POSIX Programmer's Manual, and we are gonna get you so cozy with it. π
π«Ά PROLOG π«Ά
Okay real talk first, bestie, because this part matters:
This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (so like, go consult the corresponding Linux manual page for details of Linux behavior), or honestly the interface may not even be implemented on Linux at all. iykyk π
β¨ NAME β¨
cal β print a calendar π
πΈ SYNOPSIS πΈ
cal [[month] year]
π DESCRIPTION π
The cal utility shall write a calendar to standard output, and the way it does that is iconic actually: 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. time travel era fr fr π¦
Now, what you get depends on what you hand it:
- If no operands are given,
calshall produce a one-month calendar for the current month in the current year. ποΈ - If only the year operand is given,
calshall produce a calendar for all twelve months in the given calendar year. β¨ - If both month and year operands are given,
calshall produce a one-month calendar for the given month in the given year. π
π OPTIONS π
None. Not a single one. The girl is serving minimalism, she needs nothing. π
π OPERANDS π
The following operands shall be supported:
- month β Specify the month to be displayed, represented as a decimal integer from
1(January) to12(December). πΈ - year β Specify the year for which the calendar is displayed, represented as a decimal integer from
1to9999. β
π STDIN π
Not used. She's not reading your messages, bestie, she's just posting. π
π 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. she's the boss, periodt.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. ποΈ (yes this one is literally the calendar vibe-setter)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. no drama, standard behavior, we love that for her.
β STDOUT β
The standard output shall be used to display the calendar, in an unspecified format. so don't come for the layout, it's unspecified bestie π
π STDERR π
The standard error shall be used only for diagnostic messages. That's it. Nothing else lives there. π«
π¦ 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. π we ate.>0β An error occurred. π
π CONSEQUENCES OF ERRORS π
Default.
The following sections are informative. (yes, that means they're the gossip, not the rules)
π APPLICATION USAGE π
Note that:
cal 83
refers to A.D. 83, not 1983. β οΈ Like, the year 83. Ancient Rome era. Not your aunt's birth year. Do not get this twisted, bestie. ποΈ
π EXAMPLES π
None.
π§ RATIONALE π§
Okay so this is the tea β and it's actually kind of juicy:
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. Not me finding out the old standard was just wrong the whole time π
This did not match historic practice in any known version of the cal utility. 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. β¨ fixed it, slay.
π FUTURE DIRECTIONS π
A future version of this standard may support locale-specific recognition of the date of adoption of the Gregorian calendar. so like, watch this space, the calendar lore might get even deeper. π¦
π 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 came to you courtesy of IEEE/The Open Group, 2017 β mwah, ty for the lore, we're obsessed ππ«Άπ cal rights!
π¦ where this page comes from
- alpine 3.22: man-pages-posix 2017a-r0 Β· custom
- alpine 3.23: man-pages-posix 2017a-r0 Β· custom
- alpine 3.24: man-pages-posix 2017a-r0 Β· custom
- arch rolling: man-pages 6.19-1
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages-posix 2017a
- opensuse-leap 16.0: man-pages-posix 2017a-160000.4.1 Β· SUSE-IEEE
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms