my $month = shift;
my $archivebase = shift;
+ if (not exists $wikistate{calendar}{minyear}) {
+ $wikistate{calendar}{minyear} = $year;
+ }
+
my $pmonth = $month;
my $pyear = $year;
while ((not exists $pagesources{"$archivebase/$pyear/" . sprintf("%02d", $pmonth)}) or ($pmonth == $month and $pyear == $year)) {
my $month = shift;
my $archivebase = shift;
+ if (not exists $wikistate{calendar}{maxyear}) {
+ $wikistate{calendar}{maxyear} = $year;
+ }
+
my $nmonth = $month;
my $nyear = $year;
while ((not exists $pagesources{"$archivebase/$nyear/" . sprintf("%02d", $nmonth)}) or ($nmonth == $month and $nyear == $year)) {