mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-17 14:59:20 +02:00
Fix awful bug in rem2html for a 28-day February that starts on Sunday...
This commit is contained in:
18
www/rem2html
18
www/rem2html
@@ -400,7 +400,7 @@ sub output_calendar
|
||||
$col++;
|
||||
}
|
||||
|
||||
if ($last_col == 6) {
|
||||
if ($last_col == 6 && $first_col > 0) {
|
||||
small_calendar($Nextmon, $Nextlen, $Options{'forwurl'},
|
||||
($Firstwkday + $Numdays) % 7);
|
||||
$col++;
|
||||
@@ -451,6 +451,22 @@ sub output_calendar
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
# Add a row for small calendars if they were not yet done!
|
||||
if ($first_col == 0 && $last_col == 6) {
|
||||
if ($Options{'nostyle'}) {
|
||||
print "<tr>\n";
|
||||
} else {
|
||||
print "<tr class=\"rem-cal-row\">\n";
|
||||
}
|
||||
small_calendar($Prevmon, $Prevlen, $Options{'backurl'},
|
||||
($Firstwkday - $Prevlen + 35) % 7);
|
||||
for (my $i=0; $i<5; $i++) {
|
||||
print("<td$class> </td>\n");
|
||||
}
|
||||
small_calendar($Nextmon, $Nextlen, $Options{'forwurl'},
|
||||
($Firstwkday + $Numdays) % 7);
|
||||
print("</tr>\n");
|
||||
}
|
||||
# End the table
|
||||
print "</table>\n";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user