{
    "content": [
        {
            "type": "text",
            "text": "# HTML::CalendarMonthSimple (perldoc)\n\n## NAME\n\nHTML::CalendarMonthSimple - Perl Module for Generating HTML Calendars\n\n## SYNOPSIS\n\nuse HTML::CalendarMonthSimple;\n$cal = new HTML::CalendarMonthSimple('year'=>2001,'month'=>2);\n$cal->width('50%');\n$cal->border(10);\n$cal->header('Text at the top of the Grid');\n$cal->setcontent(14,\"Valentine's Day\");\n$cal->setdatehref(14, 'http://localhost/');\n$cal->addcontent(14,\"<p>Don't forget to buy flowers.\");\n$cal->addcontent(13,\"Guess what's tomorrow?\");\n$cal->bgcolor('pink');\nprint $cal->asHTML;\n\n## DESCRIPTION\n\nNote: This package is no longer being maintained by Gregor Mosheh <stigmata@blackangel.net>. It\nis recommended that new development be built against HTML::CalendarMonth.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **INTERFACE METHODS** (9 subsections)\n- **BUGS**\n- **LICENSE** (2 subsections)\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "HTML::CalendarMonthSimple",
        "section": "",
        "mode": "perldoc",
        "summary": "HTML::CalendarMonthSimple - Perl Module for Generating HTML Calendars",
        "synopsis": "use HTML::CalendarMonthSimple;\n$cal = new HTML::CalendarMonthSimple('year'=>2001,'month'=>2);\n$cal->width('50%');\n$cal->border(10);\n$cal->header('Text at the top of the Grid');\n$cal->setcontent(14,\"Valentine's Day\");\n$cal->setdatehref(14, 'http://localhost/');\n$cal->addcontent(14,\"<p>Don't forget to buy flowers.\");\n$cal->addcontent(13,\"Guess what's tomorrow?\");\n$cal->bgcolor('pink');\nprint $cal->asHTML;",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "INTERFACE METHODS",
                "lines": 32,
                "subsections": [
                    {
                        "name": "monthname",
                        "lines": 91
                    },
                    {
                        "name": "DaysinMonth",
                        "lines": 31
                    },
                    {
                        "name": "contentfontsize",
                        "lines": 50
                    },
                    {
                        "name": "cellalignment",
                        "lines": 56
                    },
                    {
                        "name": "weekendheadercontentcolor",
                        "lines": 78
                    },
                    {
                        "name": "tableclass",
                        "lines": 1
                    },
                    {
                        "name": "cellclass",
                        "lines": 1
                    },
                    {
                        "name": "todaycellclass",
                        "lines": 2
                    },
                    {
                        "name": "datecellclass",
                        "lines": 26
                    }
                ]
            },
            {
                "name": "BUGS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "LICENSE",
                "lines": 34,
                "subsections": [
                    {
                        "name": "cellclass",
                        "lines": 6
                    },
                    {
                        "name": "saturday",
                        "lines": 13
                    }
                ]
            }
        ],
        "sections": {
            "NAME": {
                "content": "HTML::CalendarMonthSimple - Perl Module for Generating HTML Calendars\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use HTML::CalendarMonthSimple;\n$cal = new HTML::CalendarMonthSimple('year'=>2001,'month'=>2);\n$cal->width('50%');\n$cal->border(10);\n$cal->header('Text at the top of the Grid');\n$cal->setcontent(14,\"Valentine's Day\");\n$cal->setdatehref(14, 'http://localhost/');\n$cal->addcontent(14,\"<p>Don't forget to buy flowers.\");\n$cal->addcontent(13,\"Guess what's tomorrow?\");\n$cal->bgcolor('pink');\nprint $cal->asHTML;\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Note: This package is no longer being maintained by Gregor Mosheh <stigmata@blackangel.net>. It\nis recommended that new development be built against HTML::CalendarMonth.\n\nHTML::CalendarMonthSimple is a Perl module for generating, manipulating, and printing a HTML\ncalendar grid for a specified month. It is intended as a faster and easier-to-use alternative to\nHTML::CalendarMonth.\n\nThis module requires the Date::Calc module, which is available from CPAN if you don't already\nhave it.\n",
                "subsections": []
            },
            "INTERFACE METHODS": {
                "content": "new(ARGUMENTS)\nNaturally, new() returns a newly constructed calendar object.\n\nThe optional constructor arguments 'year' and 'month' can specify which month's calendar will be\nused. If either is omitted, the current value (e.g. \"today\") is used. An important note is that\nthe month and the year are NOT the standard C or Perl -- use a month in the range 1-12 and a\nreal year, e.g. 2001.\n\nThe arguments 'todayyear', 'todaymonth', and 'todaydate' may also be specified, to specify\nwhat \"today\" is. If not specified, the system clock will be used. This is particularly useful\nwhen the todaycolor() et al methods are used, and/or if you're dealing with multiple timezones.\nNote that these arguments change what \"today\" is, which means that if you specify a todayyear\nand a todaymonth then you are effectively specifying a 'year' and 'month' argument as well,\nthough you can also specify a year and month argument and override the \"today\" behavior.\n\n# Examples:\n# Create a calendar for this month.\n$cal = new HTML::CalendarMonthSimple();\n# A calendar for a specific month/year\n$cal = new HTML::CalendarMonthSimple('month'=>2,'year'=>2000);\n# Pretend that today is June 10, 2000 and display the \"current\" calendar\n$cal = new HTML::CalendarMonthSimple('todayyear'=>2000,'todaymonth'=>6,'todaydate'=>10);\n\nyear\nmonth\ntodayyear\ntodaymonth\ntodaydate\nmonthname\nThese methods simply return the year/month/date of the calendar, as specified in the\nconstructor.\n",
                "subsections": [
                    {
                        "name": "monthname",
                        "content": "setcontent(DATE,STRING)\naddcontent(DATE,STRING)\nhighlight (@DATE)\nHighlights the particular dates given.\n\n$cal->highlight(1,10,22);\n\ngetcontent(DATE)\nThese methods are used to control the content of date cells within the calendar grid. The DATE\nargument may be a numeric date or it may be a string describing a certain occurrence of a\nweekday, e.g. \"3MONDAY\" to represent \"the third Monday of the month being worked with\", or it\nmay be the plural of a weekday name, e.g. \"wednesdays\" to represent all occurrences of the given\nweekday. The weekdays are case-insensitive.\n\nSince plural weekdays (e.g. 'wednesdays') is not a single date, getcontent() will return the\ncontent only for the first occurrence of that day within a month.\n\n# Examples:\n# The cell for the 15th of the month will now say something.\n$cal->setcontent(15,\"An Important Event!\");\n# Later down the program, we want the content to be boldfaced.\n$cal->setcontent(15,\"<b>\" . $cal->getcontent(15) . \"</b>\");\n\n# addcontent() does not clobber existing content.\n# Also, if you setcontent() to '', you've deleted the content.\n$cal->setcontent(16,'');\n$cal->addcontent(16,\"<p>Hello World</p>\");\n$cal->addcontent(16,\"<p>Hello Again</p>\");\nprint $cal->getcontent(16); # Prints 2 sentences\n\n# Padded and decimal numbers may be used, as well:\n$cal->setcontent(3.14159,'Third of the month');\n$cal->addcontent('00003.0000','Still the third');\n$cal->getcontent('3'); # Gets the 2 sentences\n\n# The second Sunday of May is some holiday or another...\n$cal->addcontent('2sunday','Some Special Day') if ($cal->month() == 5);\n\n# Every Wednesday is special...\n$cal->addcontent('wednesdays','Every Wednesday!');\n\n# either of these will return the content for the 1st Friday of the month\n$cal->getcontent('1friday');\n$cal->getcontent('Fridays'); # you really should use '1friday' for the first Friday\n\nNote: A change in 1.21 is that all content is now stored in a single set of date-indexed\nbuckets. Previously, the content for weekdays, plural weekdays, and numeric dates were stored\nseparately and could be fetched and set independently. This led to buggy behavior, so now a\nsingle storage set is used.\n\n# Example:\n# if the 9th of the month is the second Wednesday...\n$cal->setcontent(9,'ninth');\n$cal->addcontent('2wednesday','second wednesday');\n$cal->addcontent('wednesdays','every wednesday');\nprint $cal->getcontent(9);\n\nIn version 1.20 and previous, this would print 'ninth' but in 1.21 and later, this will print\nall three items (since the 9th is not only the 9th but also a Wednesday and the second\nWednesday). This could have implications if you use setcontent() on a set of days, since other\ncontent may be overwritten:\n\n# Example:\n# the second setcontent() effectively overwrites the first one\n$cal->setcontent(9,'ninth');\n$cal->setcontent('2wednesday','second wednesday');\n$cal->setcontent('wednesdays','every wednesday');\nprint $cal->getcontent(9); # returns 'every wednesday' because that was the last assignment!\n\nasHTML\nThis method returns a string containing the HTML table for the month.\n\n# Example:\nprint $cal->asHTML();\n\nIt's okay to continue modifying the calendar after calling asHTML(). My guess is that you'd\nwant to call asHTML() again to print the further-modified calendar, but that's your business...\n\nweekstartsonmonday([1|0])\nBy default, calendars are displayed with Sunday as the first day of the week (American style).\nMost of the world prefers for calendars to start the week on Monday. This method selects which\ntype is used: 1 specifies that the week starts on Monday, 0 specifies that the week starts on\nSunday (the default). If no value is given at all, the current value (1 or 0) is returned.\n\n# Example:\n$cal->weekstartsonmonday(1); # switch over to weeks starting on Monday\n$cal->weekstartsonmonday(0); # switch back to the default, where weeks start on Sunday\n\n# Example:\nprint \"The week starts on \" . ($cal->weekstartsonmonday() ? 'Sunday' : 'Monday') . \"\\n\";\n"
                    },
                    {
                        "name": "DaysinMonth",
                        "content": "This function returns the number of days on the current calendar.\n\nforeach my $day (1 .. $cal->DaysinMonth) {\n$cal->setdatehref($day, &makeurl($cal->year, $cal->month, $day));\n}\n\nsetdatehref(DATE,URLSTRING)\ngetdatehref(DATE)\nThese allow the date-number in a calendar cell to become a hyperlink to the specified URL. The\nDATE may be either a numeric date or any of the weekday formats described in setcontent(), et\nal. If plural weekdays (e.g. 'wednesdays') are used with getdatehref() the URL of the first\noccurrence of that weekday in the month will be returned (since 'wednesdays' is not a single\ndate).\n\n# Example:\n# The date number in the cell for the 15th of the month will be a link\n# then we change our mind and delete the link by assigning a null string\n$cal->setdatehref(15,\"http://sourceforge.net/\");\n$cal->setdatehref(15,'');\n\n# Example:\n# the second Wednesday of the month goes to some website\n$cal->setdatehref('2wednesday','http://www.second-wednesday.com/');\n\n# Example:\n# every Wednesday goes to a website\n# note that this will effectively undo the '2wednesday' assignment we just did!\n# if we wanted the second Wednesday to go to that special URL, we should've done that one after this!\n$cal->setdatehref('wednesdays','http://every-wednesday.net/');\n\ncontentfontsize([STRING])"
                    },
                    {
                        "name": "contentfontsize",
                        "content": "default. Can be expressed as an absolute (1 .. 6) or relative (-3 .. +3) size.\n\nborder([INTEGER])\nThis specifies the value of the border attribute to the <TABLE> declaration for the calendar. As\nsuch, this controls the thickness of the border around the calendar table. The default value is\n5.\n\nIf a value is not specified, the current value is returned. If a value is specified, the border\nvalue is changed and the new value is returned.\n\ncellpadding\ncellspacing\nwidth([INTEGER][%])\nThis sets the value of the width attribute to the <TABLE> declaration for the calendar. As such,\nthis controls the horizintal width of the calendar.\n\nThe width value can be either an integer (e.g. 600) or a percentage string (e.g. \"80%\"). Most\nweb browsers take an integer to be the table's width in pixels and a percentage to be the table\nwidth relative to the screen's width. The default width is \"100%\".\n\nIf a value is not specified, the current value is returned. If a value is specified, the border\nvalue is changed and the new value is returned.\n\n# Examples:\n$cal->width(600);    # absolute pixel width\n$cal->width(\"100%\"); # percentage of screen size\n\nshowdatenumbers([1 or 0])\nIf showdatenumbers() is set to 1, then the asHTML() method will put date labels in each cell\n(e.g. a 1 on the 1st, a 2 on the 2nd, etc.) If set to 0, then the date labels will not be\nprinted. The default is 1.\n\nIf no value is specified, the current value is returned.\n\nThe date numbers are shown in boldface, normal size font. If you want to change this, consider\nsetting showdatenumbers() to 0 and using setcontent()/addcontent() instead.\n\nshowweekdayheaders([1 or 0])\nweekdayheadersbig([1 or 0])\nIf showweekdayheaders() is set to 1 (the default) then calendars rendered via asHTML() will\ndisplay the names of the days of the week. If set to 0, the days' names will not be displayed.\n\nIf weekdayheadersbig() is set to 1 (the default) then the weekday headers will be in <th> cells.\nThe effect in most web browsers is that they will be boldfaced and centered. If set to 0, the\nweekday headers will be in <td> cells and in normal text.\n\nFor both functions, if no value is specified, the current value is returned.\n\ncellalignment([STRING])\nvcellalignment([STRING])"
                    },
                    {
                        "name": "cellalignment",
                        "content": "controls how text will be horizontally centered/aligned within the cells. vcellalignment() does\nthe same for vertical alignment. By default, content is aligned horizontally \"left\" and\nvertically \"top\"\n\nAny value can be used, if you think the web browser will find it interesting. Some useful\nalignments are: left, right, center, top, and bottom.\n\nheader([STRING])\nBy default, the current month and year are displayed at the top of the calendar grid. This is\ncalled the \"header\".\n\nThe header() method allows you to set the header to whatever you like. If no new header is\nspecified, the current header is returned.\n\nIf the header is set to an empty string, then no header will be printed at all. (No, you won't\nbe stuck with a big empty cell!)\n\n# Example:\n# Set the month/year header to something snazzy.\nmy($y,$m) = ( $cal->year() , $cal->monthname() );\n$cal->header(\"<center><font size=+2 color=red>$m $y</font></center>\\n\\n\");\n\nbgcolor([STRING])\nweekdaycolor([STRING])\nweekendcolor([STRING])\ntodaycolor([STRING])\nbordercolor([STRING])\nhighlightbordercolor([STRING])\nweekdaybordercolor([STRING])\nweekendbordercolor([STRING])\ntodaybordercolor([STRING])\ncontentcolor([STRING])\nhighlightcontentcolor([STRING])\nweekdaycontentcolor([STRING])\nweekendcontentcolor([STRING])\ntodaycontentcolor([STRING])\nheadercolor([STRING])\nheadercontentcolor([STRING])\nweekdayheadercolor([STRING])\nweekdayheadercontentcolor([STRING])\nweekendheadercolor([STRING])\nweekendheadercontentcolor([STRING])\nThese define the colors of the cells. If a string (which should be either a HTML color-code like\n'#000000' or a color-word like 'yellow') is supplied as an argument, then the color is set to\nthat specified. Otherwise, the current value is returned. To un-set a value, try assigning the\nnull string as a value.\n\nThe bgcolor defines the color of all cells. The weekdaycolor overrides the bgcolor for weekdays\n(Monday through Friday), the weekendcolor overrides the bgcolor for weekend days (Saturday and\nSunday), and the todaycolor overrides the bgcolor for today's date. (Which may not mean a lot if\nyou're looking at a calendar other than the current month.)\n\nThe weekdayheadercolor overrides the bgcolor for the weekday headers that appear at the top of\nthe calendar if showweekdayheaders() is true, and weekendheadercolor does the same thing for the\nweekend headers. The headercolor overrides the bgcolor for the month/year header at the top of\nthe calendar. The headercontentcolor(), weekdayheadercontentcolor(), and"
                    },
                    {
                        "name": "weekendheadercontentcolor",
                        "content": "default to the contentcolor().\n\nThe colors of the cell borders may be set: bordercolor determines the color of the calendar\ngrid's outside border, and is the default color of the inner border for individual cells. The\ninner bordercolor may be overridden for the various types of cells via weekdaybordercolor,\nweekendbordercolor, and todaybordercolor.\n\nFinally, the color of the cells' contents may be set with contentcolor, weekdaycontentcolor,\nweekendcontentcolor, and todaycontentcolor. The contentcolor is the default color of cell\ncontent, and the other methods override this for the appropriate days' cells.\n\n# Example:\n$cal->bgcolor('white');                  # Set the default cell bgcolor\n$cal->bordercolor('green');              # Set the default border color\n$cal->contentcolor('black');             # Set the default content color\n$cal->headercolor('yellow');             # Set the bgcolor of the Month+Year header\n$cal->headercontentcolor('yellow');      # Set the content color of the Month+Year header\n$cal->weekdayheadercolor('orange');      # Set the bgcolor of weekdays' headers\n$cal->weekendheadercontentcolor('blue'); # Set the color of weekday headers' contents\n$cal->weekendheadercolor('pink');        # Set the bgcolor of weekends' headers\n$cal->weekdayheadercontentcolor('blue'); # Set the color of weekend headers' contents\n$cal->weekendcolor('palegreen');         # Override weekends' cell bgcolor\n$cal->weekendcontentcolor('blue');       # Override weekends' content color\n$cal->todaycolor('red');                 # Override today's cell bgcolor\n$cal->todaycontentcolor('yellow');       # Override today's content color\nprint $cal->asHTML;                     # Print a really ugly calendar!\n\ndatecolor(DATE,[STRING])\ndatecontentcolor(DATE,[STRING])\ndatebordercolor(DATE,[STRING])\nThese methods set the cell color and the content color for the specified date, and will return\nthe current value if STRING is not specified. These color settings will override any of the\nsettings mentioned above, even todaycolor() and todaycontentcolor().\n\nThe date may be a numeric date or a weekday string as described in setcontent() et al. Note that\nif a plural weekday is used (e.g. 'sundays') then, since it's not a single date, the value for\nthe first occurrence of that weekday will be returned (e.g. the first Sunday's color).\n\n# Example: a red-letter day!\n$cal->datecolor(3,'pink');\n$cal->datecontentcolor(3,'red');\n\n# Example:\n# Every Tuesday is a Soylent Green day...\n# Note that if the 3rd was a Tuesday, this later assignment would override the previous one.\n# see the docs for setcontent() et all for more information.\n$cal->datecolor('tuesdays','green');\n$cal->datecontentcolor('tuesdays','yellow');\n\nnowrap([1 or 0])\nIf set to 1, then calendar cells will have the NOWRAP attribute set, preventing their content\nfrom wrapping. If set to 0 (the default) then NOWRAP is not used and very long content may cause\ncells to become stretched out.\n\nsharpborders([1 or 0])\nIf set to 1, this gives very crisp edges between the table cells. If set to 0 (the default)\nstandard HTML cells are used. If neither value is specified, the current value is returned.\n\nFYI: To accomplish the crisp border, the entire calendar table is wrapped inside a table cell.\n\ncellheight([NUMBER])\nThis specifies the height in pixels of each cell in the calendar. By default, no height is\ndefined and the web browser usually chooses a reasonable default.\n\nIf no value is given, the current value is returned.\n\nTo un-specify a height, try specifying a height of 0 or undef.\n\ntableclass([STRING])\ncellclass([STRING])\nweekdaycellclass([STRING])\nweekendcellclass([STRING])\ntodaycellclass([STRING])\ndatecellclass(DATE,[STRING])\nheaderclass([STRING])\nThese specify which CSS class will be attributed to the calendar's table and the calendar's\ncells. By default, no classes are specified or used.\n"
                    },
                    {
                        "name": "tableclass",
                        "content": ""
                    },
                    {
                        "name": "cellclass",
                        "content": ""
                    },
                    {
                        "name": "todaycellclass",
                        "content": "used for the calendar's header.\n"
                    },
                    {
                        "name": "datecellclass",
                        "content": "override any of the other cell class settings, even todaycellclass() This date must be numeric;\nit cannot be a string such as \"2wednesday\"\n\nIf no value is given, the current value is returned.\n\nTo un-specify a class, try specifying an empty string, e.g. cellclass('')\n\nsunday([STRING])\nsaturday([STRING])\nweekdays([MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY])\nThese functions allow the days of the week to be \"renamed\", which is useful for displaying the\nweekday headers in another language.\n\n# show the days of the week in Spanish\n$cal->saturday('S�bado');\n$cal->sunday('Domingo');\n$cal->weekdays('Lunes','Martes','Mi�rcoles','Jueves','Viernes');\n\n# show the days of the week in German\n$cal->saturday('Samstag');\n$cal->sunday('Sonntag');\n$cal->weekdays('Montag','Dienstag','Mittwoch','Donnerstag','Freitag');\n\nIf no value is specified (or, for weekdays() if exactly 5 arguments aren't given) then the\ncurrent value is returned.\n"
                    }
                ]
            },
            "BUGS": {
                "content": "Send bug reports to the author and log on RT.\n",
                "subsections": []
            },
            "LICENSE": {
                "content": "This program is free software licensed under the...\n\nThe BSD License\n\nThe full text of the license can be found in the LICENSE file included with this module.\n\nNote: Versions prior to 1.26 were licensed under a BSD-like statement \"This Perl module is\nfreeware. It may be copied, derived, used, and distributed without limitation.\"\n\nAUTHORS, CREDITS, COPYRIGHTS\nHTML::CalendarMonth was written and is copyrighted by Matthew P. Sisk <sisk@mojotoad.com> and\nprovided inspiration for the module's interface and features. None of Matt Sisk's code appears\nherein.\n\nHTML::CalendarMonthSimple was written by Gregor Mosheh <stigmata@blackangel.net> Frankly, the\nmajor inspiration was the difficulty and unnecessary complexity of HTML::CalendarMonth.\n(Laziness is a virtue.)\n\nThis would have been extremely difficult if not for Date::Calc. Many thanks to Steffen Beyer\n<sb@engelschall.com> for a very fine set of date-related functions!\n\nDave Fuller <dffuller@yahoo.com> added the getdatehref() and setdatehref() methods, and pointed\nout the bugs that were corrected in 1.01.\n\nDanny J. Sohier <danny@gel.ulaval.ca> provided many of the color functions.\n\nBernie Ledwick <bl@man.fwltech.com> provided base code for the today*() functions, and for the\nhandling of cell borders.\n\nJustin Ainsworth <jrainswo@olemiss.edu> provided the vcellalignment() concept and code.\n\nJessee Porter <porterje@us.ibm.com> provided fixes for 1.12 to correct those warnings.\n\nBray Jones <bjones@vialogix.com> supplied the sharpborders(), nowrap(), cellheight(),",
                "subsections": [
                    {
                        "name": "cellclass",
                        "content": "Bill Turner <b@brilliantcorners.org> supplied the headerclass() method and the rest of the\nmethods added to 1.13\n\nBill Rhodes <wrhodes@27.org> provided the contentfontsize() method for version 1.14\n\nAlberto Sim�es <albie@alfarrabio.di.uminho.pt> provided the tableclass() function and the"
                    },
                    {
                        "name": "saturday",
                        "content": "wanting this since the beginning!\n\nBlair Zajac <blair@orcaware.com> provided the fixes for 1.19\n\nThanks to Kurt <kurt@otown.com> for the bug report that made all the new stuff in 1.21 possible.\n\nMany thanks to Stefano Rodighiero <larsen@libero.it> for the code that made weekstartsonmonday()\npossible. This was a much-requested feature that will make many people happy!\n\nDan Boitnott <dboitnot@yahoo.com> provided todayyear() et al in 1.23\n\nPeter Venables <pvenables@rogers.com> provided the XML validation fixes for 1.24\n"
                    }
                ]
            }
        }
    }
}