{
    "content": [
        {
            "type": "text",
            "text": "# calendar (pydoc)\n\n## TLDR\n\n> Display upcoming events from a calendar file.\n\n- Show events for today and tomorrow (or the weekend on Friday) from the default calendar:\n  `calendar`\n- Look [A]head, showing events for the next 30 days:\n  `calendar -A {{30}}`\n- Look [B]ack, showing events for the previous 7 days:\n  `calendar -B {{7}}`\n- Show events from a custom calendar [f]ile:\n  `calendar -f {{path/to/file}}`\n\n*Source: tldr-pages*\n\n---\n\n**Summary:** calendar - Calendar printing functions\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **MODULE REFERENCE** (8 lines)\n- **DESCRIPTION** (5 lines)\n- **CLASSES** (10 lines) — 7 subsections\n  - class Calendar (81 lines)\n  - class HTMLCalendar (129 lines)\n  - class IllegalMonthError (72 lines)\n  - class IllegalWeekdayError (70 lines)\n  - class LocaleHTMLCalendar (136 lines)\n  - class LocaleTextCalendar (125 lines)\n  - class TextCalendar (119 lines)\n- **FUNCTIONS** (5 lines) — 7 subsections\n  - isleap (2 lines)\n  - leapdays (10 lines)\n  - monthrange (6 lines)\n  - prmonth (2 lines)\n  - setfirstweekday (1 lines)\n  - timegm (2 lines)\n  - weekday (5 lines)\n- **DATA** (13 lines)\n- **FILE** (3 lines)\n\n## Full Content\n\n### NAME\n\ncalendar - Calendar printing functions\n\n### MODULE REFERENCE\n\nhttps://docs.python.org/3.10/library/calendar.html\n\nThe following documentation is automatically generated from the Python\nsource files.  It may be incomplete, incorrect or include features that\nare considered implementation detail and may vary between Python\nimplementations.  When in doubt, consult the module reference at the\nlocation listed above.\n\n### DESCRIPTION\n\nNote when comparing these calendars to the ones printed by cal(1): By\ndefault, these calendars have Monday as the first day of the week, and\nSunday as the last (the European convention). Use setfirstweekday() to\nset the first day of the week (0=Monday, 6=Sunday).\n\n### CLASSES\n\nbuiltins.ValueError(builtins.Exception)\nIllegalMonthError\nIllegalWeekdayError\nbuiltins.object\nCalendar\nHTMLCalendar\nLocaleHTMLCalendar\nTextCalendar\nLocaleTextCalendar\n\n#### class Calendar\n\n|  Calendar(firstweekday=0)\n|\n|  Base calendar class. This class doesn't do any formatting. It simply\n|  provides data to subclasses.\n|\n|  Methods defined here:\n|\n|  init(self, firstweekday=0)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  getfirstweekday(self)\n|\n|  itermonthdates(self, year, month)\n|      Return an iterator for one month. The iterator will yield datetime.date\n|      values and will always iterate through complete weeks, so it will yield\n|      dates outside the specified month.\n|\n|  itermonthdays(self, year, month)\n|      Like itermonthdates(), but will yield day numbers. For days outside\n|      the specified month the day number is 0.\n|\n|  itermonthdays2(self, year, month)\n|      Like itermonthdates(), but will yield (day number, weekday number)\n|      tuples. For days outside the specified month the day number is 0.\n|\n|  itermonthdays3(self, year, month)\n|      Like itermonthdates(), but will yield (year, month, day) tuples.  Can be\n|      used for dates outside of datetime.date range.\n|\n|  itermonthdays4(self, year, month)\n|      Like itermonthdates(), but will yield (year, month, day, dayofweek) tuples.\n|      Can be used for dates outside of datetime.date range.\n|\n|  iterweekdays(self)\n|      Return an iterator for one week of weekday numbers starting with the\n|      configured first one.\n|\n|  monthdatescalendar(self, year, month)\n|      Return a matrix (list of lists) representing a month's calendar.\n|      Each row represents a week; week entries are datetime.date values.\n|\n|  monthdays2calendar(self, year, month)\n|      Return a matrix representing a month's calendar.\n|      Each row represents a week; week entries are\n|      (day number, weekday number) tuples. Day numbers outside this month\n|      are zero.\n|\n|  monthdayscalendar(self, year, month)\n|      Return a matrix representing a month's calendar.\n|      Each row represents a week; days outside this month are zero.\n|\n|  setfirstweekday(self, firstweekday)\n|\n|  yeardatescalendar(self, year, width=3)\n|      Return the data for the specified year ready for formatting. The return\n|      value is a list of month rows. Each month row contains up to width months.\n|      Each month contains between 4 and 6 weeks and each week contains 1-7\n|      days. Days are datetime.date objects.\n|\n|  yeardays2calendar(self, year, width=3)\n|      Return the data for the specified year ready for formatting (similar to\n|      yeardatescalendar()). Entries in the week lists are\n|      (day number, weekday number) tuples. Day numbers outside this month are\n|      zero.\n|\n|  yeardayscalendar(self, year, width=3)\n|      Return the data for the specified year ready for formatting (similar to\n|      yeardatescalendar()). Entries in the week lists are day numbers.\n|      Day numbers outside this month are zero.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  firstweekday\n\n#### class HTMLCalendar\n\n|  HTMLCalendar(firstweekday=0)\n|\n|  This calendar returns complete HTML pages.\n|\n|  Method resolution order:\n|      HTMLCalendar\n|      Calendar\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  formatday(self, day, weekday)\n|      Return a day as a table cell.\n|\n|  formatmonth(self, theyear, themonth, withyear=True)\n|      Return a formatted month as a table.\n|\n|  formatmonthname(self, theyear, themonth, withyear=True)\n|      Return a month name as a table row.\n|\n|  formatweek(self, theweek)\n|      Return a complete week as a table row.\n|\n|  formatweekday(self, day)\n|      Return a weekday name as a table header.\n|\n|  formatweekheader(self)\n|      Return a header for a week as a table row.\n|\n|  formatyear(self, theyear, width=3)\n|      Return a formatted year as a table of tables.\n|\n|  formatyearpage(self, theyear, width=3, css='calendar.css', encoding=None)\n|      Return a formatted year as a complete HTML page.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  cssclassmonth = 'month'\n|\n|  cssclassmonthhead = 'month'\n|\n|  cssclassnoday = 'noday'\n|\n|  cssclassyear = 'year'\n|\n|  cssclassyearhead = 'year'\n|\n|  cssclasses = ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun']\n|\n|  cssclassesweekdayhead = ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', '...\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from Calendar:\n|\n|  init(self, firstweekday=0)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  getfirstweekday(self)\n|\n|  itermonthdates(self, year, month)\n|      Return an iterator for one month. The iterator will yield datetime.date\n|      values and will always iterate through complete weeks, so it will yield\n|      dates outside the specified month.\n|\n|  itermonthdays(self, year, month)\n|      Like itermonthdates(), but will yield day numbers. For days outside\n|      the specified month the day number is 0.\n|\n|  itermonthdays2(self, year, month)\n|      Like itermonthdates(), but will yield (day number, weekday number)\n|      tuples. For days outside the specified month the day number is 0.\n|\n|  itermonthdays3(self, year, month)\n|      Like itermonthdates(), but will yield (year, month, day) tuples.  Can be\n|      used for dates outside of datetime.date range.\n|\n|  itermonthdays4(self, year, month)\n|      Like itermonthdates(), but will yield (year, month, day, dayofweek) tuples.\n|      Can be used for dates outside of datetime.date range.\n|\n|  iterweekdays(self)\n|      Return an iterator for one week of weekday numbers starting with the\n|      configured first one.\n|\n|  monthdatescalendar(self, year, month)\n|      Return a matrix (list of lists) representing a month's calendar.\n|      Each row represents a week; week entries are datetime.date values.\n|\n|  monthdays2calendar(self, year, month)\n|      Return a matrix representing a month's calendar.\n|      Each row represents a week; week entries are\n|      (day number, weekday number) tuples. Day numbers outside this month\n|      are zero.\n|\n|  monthdayscalendar(self, year, month)\n|      Return a matrix representing a month's calendar.\n|      Each row represents a week; days outside this month are zero.\n|\n|  setfirstweekday(self, firstweekday)\n|\n|  yeardatescalendar(self, year, width=3)\n|      Return the data for the specified year ready for formatting. The return\n|      value is a list of month rows. Each month row contains up to width months.\n|      Each month contains between 4 and 6 weeks and each week contains 1-7\n|      days. Days are datetime.date objects.\n|\n|  yeardays2calendar(self, year, width=3)\n|      Return the data for the specified year ready for formatting (similar to\n|      yeardatescalendar()). Entries in the week lists are\n|      (day number, weekday number) tuples. Day numbers outside this month are\n|      zero.\n|\n|  yeardayscalendar(self, year, width=3)\n|      Return the data for the specified year ready for formatting (similar to\n|      yeardatescalendar()). Entries in the week lists are day numbers.\n|      Day numbers outside this month are zero.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from Calendar:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  firstweekday\n\n#### class IllegalMonthError\n\n|  IllegalMonthError(month)\n|\n|  # Exceptions raised for bad input\n|\n|  Method resolution order:\n|      IllegalMonthError\n|      builtins.ValueError\n|      builtins.Exception\n|      builtins.BaseException\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  init(self, month)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  str(self)\n|      Return str(self).\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.ValueError:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.BaseException:\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  reduce(...)\n|      Helper for pickle.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  setstate(...)\n|\n|  withtraceback(...)\n|      Exception.withtraceback(tb) --\n|      set self.traceback to tb and return self.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.BaseException:\n|\n|  cause\n|      exception cause\n|\n|  context\n|      exception context\n|\n|  dict\n|\n|  suppresscontext\n|\n|  traceback\n|\n|  args\n\n#### class IllegalWeekdayError\n\n|  IllegalWeekdayError(weekday)\n|\n|  Method resolution order:\n|      IllegalWeekdayError\n|      builtins.ValueError\n|      builtins.Exception\n|      builtins.BaseException\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  init(self, weekday)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  str(self)\n|      Return str(self).\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.ValueError:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.BaseException:\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  reduce(...)\n|      Helper for pickle.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  setstate(...)\n|\n|  withtraceback(...)\n|      Exception.withtraceback(tb) --\n|      set self.traceback to tb and return self.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.BaseException:\n|\n|  cause\n|      exception cause\n|\n|  context\n|      exception context\n|\n|  dict\n|\n|  suppresscontext\n|\n|  traceback\n|\n|  args\n\n#### class LocaleHTMLCalendar\n\n|  LocaleHTMLCalendar(firstweekday=0, locale=None)\n|\n|  This class can be passed a locale name in the constructor and will return\n|  month and weekday names in the specified locale. If this locale includes\n|  an encoding all strings containing month and weekday names will be returned\n|  as unicode.\n|\n|  Method resolution order:\n|      LocaleHTMLCalendar\n|      HTMLCalendar\n|      Calendar\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  init(self, firstweekday=0, locale=None)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  formatmonthname(self, theyear, themonth, withyear=True)\n|      Return a month name as a table row.\n|\n|  formatweekday(self, day)\n|      Return a weekday name as a table header.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from HTMLCalendar:\n|\n|  formatday(self, day, weekday)\n|      Return a day as a table cell.\n|\n|  formatmonth(self, theyear, themonth, withyear=True)\n|      Return a formatted month as a table.\n|\n|  formatweek(self, theweek)\n|      Return a complete week as a table row.\n|\n|  formatweekheader(self)\n|      Return a header for a week as a table row.\n|\n|  formatyear(self, theyear, width=3)\n|      Return a formatted year as a table of tables.\n|\n|  formatyearpage(self, theyear, width=3, css='calendar.css', encoding=None)\n|      Return a formatted year as a complete HTML page.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes inherited from HTMLCalendar:\n|\n|  cssclassmonth = 'month'\n|\n|  cssclassmonthhead = 'month'\n|\n|  cssclassnoday = 'noday'\n|\n|  cssclassyear = 'year'\n|\n|  cssclassyearhead = 'year'\n|\n|  cssclasses = ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun']\n|\n|  cssclassesweekdayhead = ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', '...\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from Calendar:\n|\n|  getfirstweekday(self)\n|\n|  itermonthdates(self, year, month)\n|      Return an iterator for one month. The iterator will yield datetime.date\n|      values and will always iterate through complete weeks, so it will yield\n|      dates outside the specified month.\n|\n|  itermonthdays(self, year, month)\n|      Like itermonthdates(), but will yield day numbers. For days outside\n|      the specified month the day number is 0.\n|\n|  itermonthdays2(self, year, month)\n|      Like itermonthdates(), but will yield (day number, weekday number)\n|      tuples. For days outside the specified month the day number is 0.\n|\n|  itermonthdays3(self, year, month)\n|      Like itermonthdates(), but will yield (year, month, day) tuples.  Can be\n|      used for dates outside of datetime.date range.\n|\n|  itermonthdays4(self, year, month)\n|      Like itermonthdates(), but will yield (year, month, day, dayofweek) tuples.\n|      Can be used for dates outside of datetime.date range.\n|\n|  iterweekdays(self)\n|      Return an iterator for one week of weekday numbers starting with the\n|      configured first one.\n|\n|  monthdatescalendar(self, year, month)\n|      Return a matrix (list of lists) representing a month's calendar.\n|      Each row represents a week; week entries are datetime.date values.\n|\n|  monthdays2calendar(self, year, month)\n|      Return a matrix representing a month's calendar.\n|      Each row represents a week; week entries are\n|      (day number, weekday number) tuples. Day numbers outside this month\n|      are zero.\n|\n|  monthdayscalendar(self, year, month)\n|      Return a matrix representing a month's calendar.\n|      Each row represents a week; days outside this month are zero.\n|\n|  setfirstweekday(self, firstweekday)\n|\n|  yeardatescalendar(self, year, width=3)\n|      Return the data for the specified year ready for formatting. The return\n|      value is a list of month rows. Each month row contains up to width months.\n|      Each month contains between 4 and 6 weeks and each week contains 1-7\n|      days. Days are datetime.date objects.\n|\n|  yeardays2calendar(self, year, width=3)\n|      Return the data for the specified year ready for formatting (similar to\n|      yeardatescalendar()). Entries in the week lists are\n|      (day number, weekday number) tuples. Day numbers outside this month are\n|      zero.\n|\n|  yeardayscalendar(self, year, width=3)\n|      Return the data for the specified year ready for formatting (similar to\n|      yeardatescalendar()). Entries in the week lists are day numbers.\n|      Day numbers outside this month are zero.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from Calendar:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  firstweekday\n\n#### class LocaleTextCalendar\n\n|  LocaleTextCalendar(firstweekday=0, locale=None)\n|\n|  This class can be passed a locale name in the constructor and will return\n|  month and weekday names in the specified locale. If this locale includes\n|  an encoding all strings containing month and weekday names will be returned\n|  as unicode.\n|\n|  Method resolution order:\n|      LocaleTextCalendar\n|      TextCalendar\n|      Calendar\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  init(self, firstweekday=0, locale=None)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  formatmonthname(self, theyear, themonth, width, withyear=True)\n|      Return a formatted month name.\n|\n|  formatweekday(self, day, width)\n|      Returns a formatted week day name.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from TextCalendar:\n|\n|  formatday(self, day, weekday, width)\n|      Returns a formatted day.\n|\n|  formatmonth(self, theyear, themonth, w=0, l=0)\n|      Return a month's calendar string (multi-line).\n|\n|  formatweek(self, theweek, width)\n|      Returns a single week in a string (no newline).\n|\n|  formatweekheader(self, width)\n|      Return a header for a week.\n|\n|  formatyear(self, theyear, w=2, l=1, c=6, m=3)\n|      Returns a year's calendar as a multi-line string.\n|\n|  prmonth(self, theyear, themonth, w=0, l=0)\n|      Print a month's calendar.\n|\n|  prweek(self, theweek, width)\n|      Print a single week (no newline).\n|\n|  pryear(self, theyear, w=0, l=0, c=6, m=3)\n|      Print a year's calendar.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from Calendar:\n|\n|  getfirstweekday(self)\n|\n|  itermonthdates(self, year, month)\n|      Return an iterator for one month. The iterator will yield datetime.date\n|      values and will always iterate through complete weeks, so it will yield\n|      dates outside the specified month.\n|\n|  itermonthdays(self, year, month)\n|      Like itermonthdates(), but will yield day numbers. For days outside\n|      the specified month the day number is 0.\n|\n|  itermonthdays2(self, year, month)\n|      Like itermonthdates(), but will yield (day number, weekday number)\n|      tuples. For days outside the specified month the day number is 0.\n|\n|  itermonthdays3(self, year, month)\n|      Like itermonthdates(), but will yield (year, month, day) tuples.  Can be\n|      used for dates outside of datetime.date range.\n|\n|  itermonthdays4(self, year, month)\n|      Like itermonthdates(), but will yield (year, month, day, dayofweek) tuples.\n|      Can be used for dates outside of datetime.date range.\n|\n|  iterweekdays(self)\n|      Return an iterator for one week of weekday numbers starting with the\n|      configured first one.\n|\n|  monthdatescalendar(self, year, month)\n|      Return a matrix (list of lists) representing a month's calendar.\n|      Each row represents a week; week entries are datetime.date values.\n|\n|  monthdays2calendar(self, year, month)\n|      Return a matrix representing a month's calendar.\n|      Each row represents a week; week entries are\n|      (day number, weekday number) tuples. Day numbers outside this month\n|      are zero.\n|\n|  monthdayscalendar(self, year, month)\n|      Return a matrix representing a month's calendar.\n|      Each row represents a week; days outside this month are zero.\n|\n|  setfirstweekday(self, firstweekday)\n|\n|  yeardatescalendar(self, year, width=3)\n|      Return the data for the specified year ready for formatting. The return\n|      value is a list of month rows. Each month row contains up to width months.\n|      Each month contains between 4 and 6 weeks and each week contains 1-7\n|      days. Days are datetime.date objects.\n|\n|  yeardays2calendar(self, year, width=3)\n|      Return the data for the specified year ready for formatting (similar to\n|      yeardatescalendar()). Entries in the week lists are\n|      (day number, weekday number) tuples. Day numbers outside this month are\n|      zero.\n|\n|  yeardayscalendar(self, year, width=3)\n|      Return the data for the specified year ready for formatting (similar to\n|      yeardatescalendar()). Entries in the week lists are day numbers.\n|      Day numbers outside this month are zero.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from Calendar:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  firstweekday\n\n#### class TextCalendar\n\n|  TextCalendar(firstweekday=0)\n|\n|  Subclass of Calendar that outputs a calendar as a simple plain text\n|  similar to the UNIX program cal.\n|\n|  Method resolution order:\n|      TextCalendar\n|      Calendar\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  formatday(self, day, weekday, width)\n|      Returns a formatted day.\n|\n|  formatmonth(self, theyear, themonth, w=0, l=0)\n|      Return a month's calendar string (multi-line).\n|\n|  formatmonthname(self, theyear, themonth, width, withyear=True)\n|      Return a formatted month name.\n|\n|  formatweek(self, theweek, width)\n|      Returns a single week in a string (no newline).\n|\n|  formatweekday(self, day, width)\n|      Returns a formatted week day name.\n|\n|  formatweekheader(self, width)\n|      Return a header for a week.\n|\n|  formatyear(self, theyear, w=2, l=1, c=6, m=3)\n|      Returns a year's calendar as a multi-line string.\n|\n|  prmonth(self, theyear, themonth, w=0, l=0)\n|      Print a month's calendar.\n|\n|  prweek(self, theweek, width)\n|      Print a single week (no newline).\n|\n|  pryear(self, theyear, w=0, l=0, c=6, m=3)\n|      Print a year's calendar.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from Calendar:\n|\n|  init(self, firstweekday=0)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  getfirstweekday(self)\n|\n|  itermonthdates(self, year, month)\n|      Return an iterator for one month. The iterator will yield datetime.date\n|      values and will always iterate through complete weeks, so it will yield\n|      dates outside the specified month.\n|\n|  itermonthdays(self, year, month)\n|      Like itermonthdates(), but will yield day numbers. For days outside\n|      the specified month the day number is 0.\n|\n|  itermonthdays2(self, year, month)\n|      Like itermonthdates(), but will yield (day number, weekday number)\n|      tuples. For days outside the specified month the day number is 0.\n|\n|  itermonthdays3(self, year, month)\n|      Like itermonthdates(), but will yield (year, month, day) tuples.  Can be\n|      used for dates outside of datetime.date range.\n|\n|  itermonthdays4(self, year, month)\n|      Like itermonthdates(), but will yield (year, month, day, dayofweek) tuples.\n|      Can be used for dates outside of datetime.date range.\n|\n|  iterweekdays(self)\n|      Return an iterator for one week of weekday numbers starting with the\n|      configured first one.\n|\n|  monthdatescalendar(self, year, month)\n|      Return a matrix (list of lists) representing a month's calendar.\n|      Each row represents a week; week entries are datetime.date values.\n|\n|  monthdays2calendar(self, year, month)\n|      Return a matrix representing a month's calendar.\n|      Each row represents a week; week entries are\n|      (day number, weekday number) tuples. Day numbers outside this month\n|      are zero.\n|\n|  monthdayscalendar(self, year, month)\n|      Return a matrix representing a month's calendar.\n|      Each row represents a week; days outside this month are zero.\n|\n|  setfirstweekday(self, firstweekday)\n|\n|  yeardatescalendar(self, year, width=3)\n|      Return the data for the specified year ready for formatting. The return\n|      value is a list of month rows. Each month row contains up to width months.\n|      Each month contains between 4 and 6 weeks and each week contains 1-7\n|      days. Days are datetime.date objects.\n|\n|  yeardays2calendar(self, year, width=3)\n|      Return the data for the specified year ready for formatting (similar to\n|      yeardatescalendar()). Entries in the week lists are\n|      (day number, weekday number) tuples. Day numbers outside this month are\n|      zero.\n|\n|  yeardayscalendar(self, year, width=3)\n|      Return the data for the specified year ready for formatting (similar to\n|      yeardatescalendar()). Entries in the week lists are day numbers.\n|      Day numbers outside this month are zero.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from Calendar:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  firstweekday\n\n### FUNCTIONS\n\ncalendar = formatyear(theyear, w=2, l=1, c=6, m=3) method of TextCalendar instance\nReturns a year's calendar as a multi-line string.\n\nfirstweekday = getfirstweekday() method of TextCalendar instance\n\n#### isleap\n\nReturn True for leap years, False for non-leap years.\n\n#### leapdays\n\nReturn number of leap years in range [y1, y2).\nAssume y1 <= y2.\n\nmonth = formatmonth(theyear, themonth, w=0, l=0) method of TextCalendar instance\nReturn a month's calendar string (multi-line).\n\nmonthcalendar = monthdayscalendar(year, month) method of TextCalendar instance\nReturn a matrix representing a month's calendar.\nEach row represents a week; days outside this month are zero.\n\n#### monthrange\n\nReturn weekday (0-6 ~ Mon-Sun) and number of days (28-31) for\nyear, month.\n\nprcal = pryear(theyear, w=0, l=0, c=6, m=3) method of TextCalendar instance\nPrint a year's calendar.\n\n#### prmonth\n\nPrint a month's calendar.\n\n#### setfirstweekday\n\n#### timegm\n\nUnrelated but handy function to calculate Unix timestamp from GMT.\n\n#### weekday\n\nReturn weekday (0-6 ~ Mon-Sun) for year, month (1-12), day (1-31).\n\nweekheader = formatweekheader(width) method of TextCalendar instance\nReturn a header for a week.\n\n### DATA\n\nFRIDAY = 4\nMONDAY = 0\nSATURDAY = 5\nSUNDAY = 6\nTHURSDAY = 3\nTUESDAY = 1\nWEDNESDAY = 2\nall = ['IllegalMonthError', 'IllegalWeekdayError', 'setfirstweekda...\ndayabbr = <calendar.localizedday object>\ndayname = <calendar.localizedday object>\nmonthabbr = <calendar.localizedmonth object>\nmonthname = <calendar.localizedmonth object>\n\n### FILE\n\n/usr/lib/python3.10/calendar.py\n\n"
        }
    ],
    "structuredContent": {
        "command": "calendar",
        "section": "",
        "mode": "pydoc",
        "summary": "calendar - Calendar printing functions",
        "synopsis": null,
        "tldr_summary": "Display upcoming events from a calendar file.",
        "tldr_examples": [
            {
                "description": "Show events for today and tomorrow (or the weekend on Friday) from the default calendar",
                "command": "calendar"
            },
            {
                "description": "Look [A]head, showing events for the next 30 days",
                "command": "calendar -A {{30}}"
            },
            {
                "description": "Look [B]ack, showing events for the previous 7 days",
                "command": "calendar -B {{7}}"
            },
            {
                "description": "Show events from a custom calendar [f]ile",
                "command": "calendar -f {{path/to/file}}"
            }
        ],
        "tldr_source": "official",
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "MODULE REFERENCE",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "CLASSES",
                "lines": 10,
                "subsections": [
                    {
                        "name": "class Calendar",
                        "lines": 81
                    },
                    {
                        "name": "class HTMLCalendar",
                        "lines": 129
                    },
                    {
                        "name": "class IllegalMonthError",
                        "lines": 72
                    },
                    {
                        "name": "class IllegalWeekdayError",
                        "lines": 70
                    },
                    {
                        "name": "class LocaleHTMLCalendar",
                        "lines": 136
                    },
                    {
                        "name": "class LocaleTextCalendar",
                        "lines": 125
                    },
                    {
                        "name": "class TextCalendar",
                        "lines": 119
                    }
                ]
            },
            {
                "name": "FUNCTIONS",
                "lines": 5,
                "subsections": [
                    {
                        "name": "isleap",
                        "lines": 2
                    },
                    {
                        "name": "leapdays",
                        "lines": 10
                    },
                    {
                        "name": "monthrange",
                        "lines": 6
                    },
                    {
                        "name": "prmonth",
                        "lines": 2
                    },
                    {
                        "name": "setfirstweekday",
                        "lines": 1
                    },
                    {
                        "name": "timegm",
                        "lines": 2
                    },
                    {
                        "name": "weekday",
                        "lines": 5
                    }
                ]
            },
            {
                "name": "DATA",
                "lines": 13,
                "subsections": []
            },
            {
                "name": "FILE",
                "lines": 3,
                "subsections": []
            }
        ]
    }
}