Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Web month Calander

by growlf (Pilgrim)
on Nov 22, 2001 at 15:34 UTC ( [id://126955]=note: print w/replies, xml ) Need Help??


in reply to Web month Calander

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:
November2001
SuMTuWThFSa
        123
45678910
11121314151617
18192021222324
252627282930 

Please forgive the blatent and almost unhidden plagerism from PerlDoc.com

*G*

Replies are listed 'Best First'.
Re: Re: Web month Calander
by Ryszard (Priest) on Nov 22, 2001 at 15:53 UTC

    the only reason was ignorance! i had no idea it existed. sometimes i just launch head-long into things, without doing decent research beforehand.

    thanks for the tip

    In the interest's of efficiency, i'm still interested in how the above code could by modified.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://126955]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-03-29 01:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found