HTML::CalendarMonth

Perl extension for generating and manipulating HTML calendar months
Download

HTML::CalendarMonth Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Matthew P. Sisk
  • Publisher web site:
  • http://search.cpan.org/~stigmata/HTML-CalendarMonthSimple-1.25/CalendarMonthSimple.pm

HTML::CalendarMonth Tags


HTML::CalendarMonth Description

Perl extension for generating and manipulating HTML calendar months HTML::CalendarMonth is a Perl module for generating and manipulating HTML calendar months.SYNOPSIS use HTML::CalendarMonth; use HTML::AsSubs; # Using HTML::AsSubs $c = HTML::CalendarMonth->new( month => 3, year => 69 ); $c->item($c->year, $c->month)->attr(bgcolor => 'wheat'); $c->item($c->year, $c->month)->wrap_content(font({size => '+2'})); $c->item(12, 16, 28)->wrap_content(strong()); print $c->as_HTML; # Using regular HTML::Element creation $c2 = HTML::CalendarMonth->new( month => 8, year => 79 ); $c2->item($c2->year, $c2->month)->attr(bgcolor => 'wheat'); $f = HTML::Element->new('font', size => '+2'); $c2->item($c2->year, $c2->month)->wrap_content($f); $c2->item_daycol('Su', 'Sa')->attr(bgcolor => 'cyan'); print $c2->as_HTML; # Full locale support via DateTime::Locale $c3 HTML::CalendarMonth->new( month => 8, year => 79, locale => 'fr' ); print $c3->as_HTMLHTML::CalendarMonth is a subclass of HTML::ElementTable. See HTML::ElementTable(3) for how that class works, for it affects this module on many levels. Like HTML::ElementTable, HTML::CalendarMonth behaves as if it were an HTML::ElementSuper, which is a regular HTML::Element with methods added to easily manipulate the appearance of the HTML table containing the calendar.The primary interaction with HTML::CalendarMonth is through items. An item is merely a symbol that represents the content of the cell of interest within the calendar. For instance, the element representing the 14th day of the month would be returned by $c->item(14). Similarly, the element representing the header for Monday would be returned by $c->item('Mo'). If the year happened to by 1984, then $c->item(1984) would return the cell representing the year. Since years and particular months change frequently, it is probably more useful to take advantage of the month() and year() methods, which return the respective item symbol for the current calendar. In the prior example, using 1984, the following is equivalent: $c->item($c- >year()).Multiple cells of the calendar can be manipulated as if they were a single element. For instance, $c->item(15)->attr(bgcolor => 'cyan') would alter the background color of the cell representing the 15th. By the same token, $c->item(15, 16, 17, 23)->attr(bgcolor => 'cyan') would do the same thing for all cells containing the item symbols passed to the item() method.The calendar structure is still nothing more than a table structure; the same table structure provided by the HTML::ElementTable class. In addition to the item based access methods above, calendar cells can still be accessed using row and column grid coordinates using the cell() method provided by the table class. All coordinate-based methods in the table class are accessible to the calendar class.The module includes support for week-of-the-year numbering, arbitrary 1st day of the week definitions, and aliasing so that you can express any element in any language HTML can handle.Dates that are beyond the range of the built-in time functions of perl are handled either by the 'cal' command, Date::Calc, or Date::Manip. The presence of any one of these utilities and modules will suffice for these far flung date calculations. If you want to use week-of-year numbering, then either one of the date modules is required.Full locale support is offered via DateTime::Locale. For a full list of supported locale id's, look at HTML::CalendarMonth::Locale->locales() or DateTime::Locale->ids(). Requirements: · Perl


HTML::CalendarMonth Related Software