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*
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|