Hmm, is there a reason not to use
HTML::CalendarMonth? Like so:
Updated (removed html-assubs, since CGI does all this anyhow)
#!/usr/bin/perl -w
use strict;
use HTML::CalendarMonth;
use CGI;
my $page = new CGI;
my $calendar = HTML::CalendarMonth->new();
# Lets do some customization here, since today IS thanksgiving after a
+ll
$calendar->item($calendar->year, $calendar->month)->attr(bgcolor => '#
+FF8000');
$calendar->item(22)->attr(bgcolor => '#FFD080');
$calendar->item(22)->wrap_content(
new HTML::Element 'a',
href => 'http://www.openresources.com/cgi-bin/
+dict?Form=dict2&Database=*&Query=Thanksgiving+Day',
target=> '_blank');
print $page->header();
print $calendar->as_HTML;
This results in a nice little calendar with alot of options already built for you like so:
November | 2001 |
Su | M | Tu | W | Th | F | Sa |
| | | | 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | |
Please forgive the blatent and almost unhidden plagerism from PerlDoc.com
*G*