calendar: Fix month wraparound error that broke in December.
parent
092877335c
commit
f02f806cf7
|
@ -396,8 +396,14 @@ sub preprocess (@) {
|
|||
}
|
||||
elsif ($params{type} eq 'year' && $params{year} == $thisyear) {
|
||||
# calendar for current year, updates 1st of next month
|
||||
$pagestate{$params{destpage}}{calendar}{nextchange}=
|
||||
timelocal(0, 0, 0, 1, $thismonth+1-1, $params{year});
|
||||
if ($thismonth < 12) {
|
||||
$pagestate{$params{destpage}}{calendar}{nextchange}=
|
||||
timelocal(0, 0, 0, 1, $thismonth+1-1, $params{year});
|
||||
}
|
||||
else {
|
||||
$pagestate{$params{destpage}}{calendar}{nextchange}=
|
||||
timelocal(0, 0, 0, 1, 1-1, $params{year}+1);
|
||||
}
|
||||
}
|
||||
elsif ($params{type} eq 'year' && $params{year} > $thisyear) {
|
||||
# calendar for upcoming year, updates 1st of that year
|
||||
|
|
|
@ -14,6 +14,7 @@ ikiwiki (3.20091114) UNRELEASED; urgency=low
|
|||
modification date display, etc.
|
||||
* htmllink: Allow a title attribute to be specified.
|
||||
* calendar: Add title attributes for all links in the calendars.
|
||||
* calendar: Fix month wraparound error that broke in December.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Mon, 16 Nov 2009 15:46:45 -0500
|
||||
|
||||
|
|
Loading…
Reference in New Issue