+ elsif ($relativeyear) {
+ # Any calendar relative to the current year updates 1st
+ # of next year.
+ setnextchange($params{destpage},
+ timelocal(0, 0, 0, 1, 1-1, $thisyear+1));
+ }
+ elsif ($params{type} eq 'year' && $params{year} > $thisyear) {
+ # calendar for upcoming year, updates 1st of that year
+ setnextchange($params{destpage},
+ timelocal(0, 0, 0, 1, 1-1, $params{year}));
+ }
+ else {
+ # calendar for past month or year, does not need
+ # to update any more
+ delete $pagestate{$params{destpage}}{calendar};