%args> $Queue => undef $Month => undef $Year => undef %args> <%init> use Date::Calc qw( Days_in_Month); my $title = loc("Calendar Queues"); my $query = 'Status != "deleted" '; my ($from, $to); # Create the from and to dates from the month and year. # Put this in a sub somewhere? if ( $Year && $Month ){ $from = $Year . '-' . $Month . '-' . '01'; my $last_day = Days_in_Month($Year,$Month); $to = $Year . '-' . $Month . '-' . $last_day; } %init> <& /Elements/Header, Title => $title &> <& /Tools/Calendar/Elements/Tabs, current_tab => 'Tools/Calendar/SelectCalendar.html', Title => $title &>