{
    "content": [
        {
            "type": "text",
            "text": "# cal (man)\n\n## NAME\n\ncal, ncal — displays a calendar and the date of Easter\n\n## SYNOPSIS\n\ncal [-3hjy] [-A number] [-B number] [[month] year]\ncal [-3hj] [-A number] [-B number] -m month [year]\nncal [-3bhjJpwySM] [-A number] [-B number] [-W number] [-s countrycode] [[month] year]\nncal [-Jeo] [-A number] [-B number] [year]\nncal [-CN] [-H yyyy-mm-dd] [-d yyyy-mm]\n\n## DESCRIPTION\n\nThe cal utility displays a simple calendar in traditional format and ncal offers an alternative\nlayout, more options and the date of Easter.  The new format is a little cramped but it makes a\nyear fit on a 25x80 terminal.  If arguments are not specified, the current month is displayed.\n\n## TLDR\n\n> Display a calendar with the current day highlighted.\n\n- Display a calendar for the current month:\n  `cal`\n- Display a calendar for a specific year:\n  `cal {{year}}`\n- Display a calendar for a specific month and year:\n  `cal {{month}} {{year}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION** (21 subsections)\n- **SEE ALSO**\n- **STANDARDS**\n- **HISTORY**\n- **AUTHORS**\n- **BUGS**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "cal",
        "section": "",
        "mode": "man",
        "summary": "cal, ncal — displays a calendar and the date of Easter",
        "synopsis": "cal [-3hjy] [-A number] [-B number] [[month] year]\ncal [-3hj] [-A number] [-B number] -m month [year]\nncal [-3bhjJpwySM] [-A number] [-B number] [-W number] [-s countrycode] [[month] year]\nncal [-Jeo] [-A number] [-B number] [year]\nncal [-CN] [-H yyyy-mm-dd] [-d yyyy-mm]",
        "tldr_summary": "Display a calendar with the current day highlighted.",
        "tldr_examples": [
            {
                "description": "Display a calendar for the current month",
                "command": "cal"
            },
            {
                "description": "Display a calendar for a specific year",
                "command": "cal {{year}}"
            },
            {
                "description": "Display a calendar for a specific month and year",
                "command": "cal {{month}} {{year}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-h",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-o",
                "long": null,
                "arg": null,
                "description": "Easter according to the Julian Calendar."
            },
            {
                "flag": "-e",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-j",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-m",
                "long": null,
                "arg": null,
                "description": "Display the specified month. If month is specified as a decimal number, appending ‘f’ or ‘p’ displays the same month of the following or previous year respectively."
            },
            {
                "flag": "-o",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-p",
                "long": null,
                "arg": null,
                "description": "are assumed by ncal. The country code as determined from the local environment is marked with an asterisk."
            },
            {
                "flag": "-s",
                "long": null,
                "arg": null,
                "description": "Assume the switch from Julian to Gregorian Calendar at the date associated with the countrycode. If not specified, ncal tries to guess the switch date from the local en‐ vironment or falls back to September 2, 1752. This was when Great Britain and her colonies switched to the Gregorian Calendar."
            },
            {
                "flag": "-w",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-y",
                "long": null,
                "arg": null,
                "description": "month are specified on the command line."
            },
            {
                "flag": "-3",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-1",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-A",
                "long": null,
                "arg": null,
                "description": "Months to add after. The specified number of months is added to the end of the display. This is in addition to any date range selected by the -y, -3, or -1 options. For exam‐ ple, “cal -y -B2 -A2” shows everything from November of the previous year to February of the following year. Negative numbers are allowed, in which case the specified number of months is subtracted. For example, “cal -y -B-6” shows July to December. And “cal -A11” simply shows the next 12 months."
            },
            {
                "flag": "-B",
                "long": null,
                "arg": null,
                "description": "Months to add before. The specified number of months is added to the beginning of the display. See -A for examples."
            },
            {
                "flag": "-b",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-d",
                "long": null,
                "arg": null,
                "description": "Use yyyy-mm as the current date (for debugging of date selection)."
            },
            {
                "flag": "-H",
                "long": null,
                "arg": null,
                "description": "Use yyyy-mm-dd as the current date (for debugging of highlighting)."
            },
            {
                "flag": "-M",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-S",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-W",
                "long": null,
                "arg": null,
                "description": "First week of the year has at least number days."
            },
            {
                "flag": "-b",
                "long": null,
                "arg": null,
                "description": "A single parameter specifies the year (1–9999) to be displayed; note the year must be fully specified: “cal 89” will not display a calendar for 1989. Two parameters denote the month and year; the month is either a number between 1 and 12, or a full or abbreviated name as specified by the current locale. Month and year default to those of the current system clock and time zone (so “cal -m 8” will display a calendar for the month of August in the current year). Not all options can be used together. For example the options -y, -3, and -1 are mutually ex‐ clusive. If inconsistent options are given, the later ones take precedence over the earlier ones. A year starts on January 1. Highlighting of dates is disabled if stdout is not a tty."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "calendar",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/calendar/3/json"
            },
            {
                "name": "strftime",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/strftime/3/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 6,
                "subsections": [
                    {
                        "name": "-h",
                        "lines": 1,
                        "flag": "-h"
                    },
                    {
                        "name": "-J -o",
                        "lines": 2,
                        "flag": "-o"
                    },
                    {
                        "name": "-e",
                        "lines": 1,
                        "flag": "-e"
                    },
                    {
                        "name": "-j",
                        "lines": 1,
                        "flag": "-j"
                    },
                    {
                        "name": "-m",
                        "lines": 3,
                        "flag": "-m"
                    },
                    {
                        "name": "-o",
                        "lines": 1,
                        "flag": "-o"
                    },
                    {
                        "name": "-p",
                        "lines": 3,
                        "flag": "-p"
                    },
                    {
                        "name": "-s",
                        "lines": 5,
                        "flag": "-s"
                    },
                    {
                        "name": "-w",
                        "lines": 1,
                        "flag": "-w"
                    },
                    {
                        "name": "-y",
                        "lines": 2,
                        "flag": "-y"
                    },
                    {
                        "name": "-3",
                        "lines": 1,
                        "flag": "-3"
                    },
                    {
                        "name": "-1",
                        "lines": 1,
                        "flag": "-1"
                    },
                    {
                        "name": "-A",
                        "lines": 7,
                        "flag": "-A"
                    },
                    {
                        "name": "-B",
                        "lines": 3,
                        "flag": "-B"
                    },
                    {
                        "name": "-C -b",
                        "lines": 1,
                        "flag": "-b"
                    },
                    {
                        "name": "-d",
                        "lines": 2,
                        "flag": "-d"
                    },
                    {
                        "name": "-H",
                        "lines": 2,
                        "flag": "-H"
                    },
                    {
                        "name": "-M",
                        "lines": 1,
                        "flag": "-M"
                    },
                    {
                        "name": "-S",
                        "lines": 1,
                        "flag": "-S"
                    },
                    {
                        "name": "-W",
                        "lines": 2,
                        "flag": "-W"
                    },
                    {
                        "name": "-b",
                        "lines": 14,
                        "flag": "-b"
                    }
                ]
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "STANDARDS",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "HISTORY",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "BUGS",
                "lines": 8,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "cal, ncal — displays a calendar and the date of Easter\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "cal [-3hjy] [-A number] [-B number] [[month] year]\ncal [-3hj] [-A number] [-B number] -m month [year]\nncal [-3bhjJpwySM] [-A number] [-B number] [-W number] [-s countrycode] [[month] year]\nncal [-Jeo] [-A number] [-B number] [year]\nncal [-CN] [-H yyyy-mm-dd] [-d yyyy-mm]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The cal utility displays a simple calendar in traditional format and ncal offers an alternative\nlayout, more options and the date of Easter.  The new format is a little cramped but it makes a\nyear fit on a 25x80 terminal.  If arguments are not specified, the current month is displayed.\n\nThe options are as follows:\n",
                "subsections": [
                    {
                        "name": "-h",
                        "content": "",
                        "flag": "-h"
                    },
                    {
                        "name": "-J -o",
                        "content": "Easter according to the Julian Calendar.\n",
                        "flag": "-o"
                    },
                    {
                        "name": "-e",
                        "content": "",
                        "flag": "-e"
                    },
                    {
                        "name": "-j",
                        "content": "",
                        "flag": "-j"
                    },
                    {
                        "name": "-m",
                        "content": "Display the specified month.  If month is specified as a decimal number, appending ‘f’\nor ‘p’ displays the same month of the following or previous year respectively.\n",
                        "flag": "-m"
                    },
                    {
                        "name": "-o",
                        "content": "",
                        "flag": "-o"
                    },
                    {
                        "name": "-p",
                        "content": "are assumed by ncal.  The country code as determined from the local environment is\nmarked with an asterisk.\n",
                        "flag": "-p"
                    },
                    {
                        "name": "-s",
                        "content": "Assume the switch from Julian to Gregorian Calendar at the date associated with the\ncountrycode.  If not specified, ncal tries to guess the switch date from the local en‐\nvironment or falls back to September 2, 1752.  This was when Great Britain and her\ncolonies switched to the Gregorian Calendar.\n",
                        "flag": "-s"
                    },
                    {
                        "name": "-w",
                        "content": "",
                        "flag": "-w"
                    },
                    {
                        "name": "-y",
                        "content": "month are specified on the command line.\n",
                        "flag": "-y"
                    },
                    {
                        "name": "-3",
                        "content": "",
                        "flag": "-3"
                    },
                    {
                        "name": "-1",
                        "content": "",
                        "flag": "-1"
                    },
                    {
                        "name": "-A",
                        "content": "Months to add after. The specified number of months is added to the end of the display.\nThis is in addition to any date range selected by the -y, -3, or -1 options. For exam‐\nple, “cal -y -B2 -A2” shows everything from November of the previous year to February\nof the following year. Negative numbers are allowed, in which case the specified number\nof months is subtracted. For example, “cal -y -B-6” shows July to December. And “cal\n-A11” simply shows the next 12 months.\n",
                        "flag": "-A"
                    },
                    {
                        "name": "-B",
                        "content": "Months to add before. The specified number of months is added to the beginning of the\ndisplay. See -A for examples.\n",
                        "flag": "-B"
                    },
                    {
                        "name": "-C -b",
                        "content": "",
                        "flag": "-b"
                    },
                    {
                        "name": "-d",
                        "content": "Use yyyy-mm as the current date (for debugging of date selection).\n",
                        "flag": "-d"
                    },
                    {
                        "name": "-H",
                        "content": "Use yyyy-mm-dd as the current date (for debugging of highlighting).\n",
                        "flag": "-H"
                    },
                    {
                        "name": "-M",
                        "content": "",
                        "flag": "-M"
                    },
                    {
                        "name": "-S",
                        "content": "",
                        "flag": "-S"
                    },
                    {
                        "name": "-W",
                        "content": "First week of the year has at least number days.\n",
                        "flag": "-W"
                    },
                    {
                        "name": "-b",
                        "content": "A single parameter specifies the year (1–9999) to be displayed; note the year must be fully\nspecified: “cal 89” will not display a calendar for 1989.  Two parameters denote the month and\nyear; the month is either a number between 1 and 12, or a full or abbreviated name as specified\nby the current locale.  Month and year default to those of the current system clock and time\nzone (so “cal -m 8” will display a calendar for the month of August in the current year).\n\nNot all options can be used together.  For example the options -y, -3, and -1 are mutually ex‐\nclusive. If inconsistent options are given, the later ones take precedence over the earlier\nones.\n\nA year starts on January 1.\n\nHighlighting of dates is disabled if stdout is not a tty.\n",
                        "flag": "-b"
                    }
                ]
            },
            "SEE ALSO": {
                "content": "calendar(3), strftime(3)\n",
                "subsections": []
            },
            "STANDARDS": {
                "content": "The cal utility is compliant with the X/Open System Interfaces option of the IEEE Std\n1003.1-2008 (“POSIX.1”) specification.\n\nThe flags [-3hyJeopw], as well as the ability to specify a month name as a single argument, are\nextensions to that specification.\n\nThe week number computed by -w is compliant with the ISO 8601 specification.\n",
                "subsections": []
            },
            "HISTORY": {
                "content": "A cal command appeared in Version 1 AT&T UNIX.  The ncal command appeared in FreeBSD 2.2.6.\nThe output of the cal command is supposed to be bit for bit compatible to the original Unix cal\ncommand, because its output is processed by other programs like CGI scripts, that should not be\nbroken. Therefore it will always output 8 lines, even if only 7 contain data. This extra blank\nline also appears with the original cal command, at least on Solaris 8\n",
                "subsections": []
            },
            "AUTHORS": {
                "content": "The ncal command and manual were written by Wolfgang Helbig <helbig@FreeBSD.org>.\n",
                "subsections": []
            },
            "BUGS": {
                "content": "The assignment of Julian–Gregorian switching dates to country codes is historically naive for\nmany countries.\n\nNot all options are compatible and using them in different orders will give varying results.\n\nIt is not possible to display Monday as the first day of the week with cal.\n\nBSD                              March 7, 2019                             BSD",
                "subsections": []
            }
        }
    }
}