in reply to Re: Date::Calc to HTML::CalendarMonth
in thread Date::Calc to HTML::CalendarMonth

Thanks very much for your reply (& by email). The first is very much what I'm looking for but unfortunately I can't find a way through to creating (@days). I've been working on it for hours but to no avail.

I am looking at a range over several months, and I've been using push to strip down the array, hoping to create a further calendar with the remainder. Unfortunately this doesnot happen :(

#!/usr/bin/perl -w use CGI qw(:standard); use Date::Calc qw(:all); use HTML::AsSubs; use HTML::Element; use HTML::CalendarMonth; print "Content-type: text/html\n\n"; @dates = (731158, 731159, 731160, 731161, 731178, 731600); foreach $days (@dates) { ($year,$month,$day) = Add_Delta_Days(1,1,1, $days - 1); if (($year eq 2002) && ($month eq 01)) { push (@days, $day); } else { print "ok"; } } my $c = HTML::CalendarMonth->new(month => $month, year => $year); $c->item(@days)->attr(bgcolor => 'wheat'); print $c->as_HTML;

As I mentioned I thought that the 'push' would strip away the used scalars within @dates so I could use the foreach again to generate another calendar.

If anyone could set me in the right direction to get this sorted I'd be very appreciative.

(I also couldn't get this to work at all using strict so I turned it off in the end).