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).


In reply to Re: Re: Date::Calc to HTML::CalendarMonth by jonnyfolk
in thread Date::Calc to HTML::CalendarMonth by jonnyfolk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.