Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Making a Calendar in Perl?

by gryphon (Abbot)
on Jun 22, 2005 at 02:34 UTC ( #468890=note: print w/ replies, xml ) Need Help??


in reply to Making a Calendar in Perl?

Greetings Anonymous Monk,

From what you describe in your post, I think HTML::Calender::Simple would be perfect. The whole $type/$info thing for date events didn't work for me, so I ended up just writing a simple subroutine to handle the link creation myself, then passed that into the daily_info method.

use strict; use warnings; use CGI; use HTML::Calendar::Simple; my $cgi = CGI->new; print $cgi->header; my $cal = HTML::Calendar::Simple->new({ 'month' => 6, 'year' => 2005, }); sub _display_events { my $events = shift; return join('<br/>', map { $cgi->a({ href => $_->[0] }, $_->[1]) } (@{$events})); } $cal->daily_info({ 'day' => 21, 'events' => _display_events([ ['http://perlmonks.org', 'PerlMonks'], ['http://whitepages.com', 'Whitepages'] ]), }); print $cal->calendar_month;

gryphon
Whitepages.com Development Manager (DSMS)
code('Perl') || die;


Comment on Re: Making a Calendar in Perl?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2015-07-04 10:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (59 votes), past polls