Templatized Events Calendar.

This commit is contained in:
JT Smith 2002-11-25 05:50:58 +00:00
parent f3872bc104
commit 86d374258c
6 changed files with 318 additions and 114 deletions

View file

@ -399,6 +399,32 @@ sub localtime {
return Date::Calc::Localtime($_[0]);
}
#-------------------------------------------------------------------
=head2 monthCount ( startEpoch, endEpoch )
Returns the number of months between the start and end dates
(inclusive).
=item startEpoch
An epoch datestamp corresponding to the first month.
=item endEpoch
An epoch datestamp corresponding to the last month.
=cut
sub monthCount {
my ($start, $end) = @_;
my $count = 1;
while (addToDate($start,0,$count,0) < $end) {
$count++;
}
return $count;
}
#-------------------------------------------------------------------
=head2 monthStartEnd ( epoch )