NAME
    Calendar::Generate - Rule based calendar generation.

SYNOPSIS
    This is alpha code. API is subject to (and will) change.

     # The easy way.

     use Calendar::Generate;

     my $calendar = new Calendar::Generate;
     print $calendar->generate( 2004, 12, 25 );

     # The detailed way.

     use Calendar::Generate;
 
     my $calendar = new Calendar::Generate;
     $calendar->rules( 
          -month_header => "<TABLE>\n",
          -title_start => '<TR><TD COLSPAN=7 ALIGN=CENTER>',
          -title_end => "</TD></TR>\n",
          -title_center => 1,
          -title_text => undef,
          -row_start => '<TR> ',
          -row_end => "</TR>\n",
          -space_start => '<TD>&nbsp;',
          -space_char => '',
          -space_end => '&nbsp;&nbsp;&nbsp;</TD>',
          -highlight_start => '<TD>&nbsp;<B>',
          -highlight_end => '</B>&nbsp;</TD>',
          -digit_start => '<TD>&nbsp;',
          -digit_end => '&nbsp;</TD>',
          -dow_start => '<TH WIDTH=14%> ',
          -dow_end => '&nbsp;</TH>',
          -dow_length => 3,
          -month_footer => "</TABLE>\n",
          -data_use => 0,
          -data_start => '',
          -data_end => '',  
          -data_null => '',
          -data_place => 1
     );

     print $calendar->generate( 2004, 12, 25 );

DESCRIPTION
    Calendar::Generate creates a calendar formatted based on rules that you
    provide.

  Creating a new object
     $calendar = new Calendar::Generate;

  Setting rules
     $calendar->rules( { param => value, ... } );

FORMATTING RULES
    -month_header
        Printed before the calendar.

    -title_start
        The left of the month title.

    -title_end
        The right of the month title.

    -title_center
        Define this to center the month title.

    -row_start
        For before every row in the calendar (excluding title).

    -row_end
        For the end of every row in the calendar (excuding title).

    -space_start
        Formatting start for a blank entry.

    -space_char
        Chracter to use for a blank space.

    -space_end
        Formatting for use at the end of a blank entry.

    -highlight_start
        Formatting for the start of a highlighted entry.

    -highlight_end
        ... and the end of a highlighted entry.

    -digit_start
        Formatting used before the printing of the day number.

    -digit_end
        ... and the end of the day number.

    -dow_start
        Formatting for the start of a day of the week.

    -dow_end
        ... are you starting to see a pattern here?

    -dow_length
        The number of letters of the day of the week to print.

    -month_footer
        Printed at the end of the calendar.

    -data_use
        Determines if data associated with each date should be printed (0 =
        no, 1 = yes/don't print nulls, 2 = yes/print nulls)

    -data_null
        The data to use for a day that has no associated data.

    -data_start
        Formatting for the start of a data item.

    -data_end
        ... and the end.

    -data_place
        determines where data item should be placed (0 = before, 1 = after)

  Printing output
         Both of these return the formatted calendar.
         $calendar->generate( 'Year', 'Month', 'Day' );
         $calendar->calendar();

        Generate actually builds the calendar so if you plan to use
        get_calendar() for whatever reason, you need to have first called
        generate()

PROVIDED RULESETS
         $calendar->rules_cal();

        This is a set of attributes which will make the output look like
        that of cal(1). It is also currently the default set of attributes.

         $calendar->rules_html();

        This is a set of attributes which will make the output print well in
        a table compliant web browser. It also works in the Lynx text
        browser.

AUTHOR
    This module is based on code origionally written by Matthew Darwin and
    the origional version is available at http://www.mdarwin.ca/perl

    Currently the maintainer is Clint Moore <cmoore@cpan.org>

SEE ALSO
    Date::DateCalc(3) cal(1)

