Templatized Events Calendar.
This commit is contained in:
parent
f3872bc104
commit
86d374258c
6 changed files with 318 additions and 114 deletions
|
|
@ -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 )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue