- Corrected the "30 days in August" bug.
- Removed odd styling from task.html CSS.
This commit is contained in:
21
src/task.cpp
21
src/task.cpp
@@ -1878,6 +1878,14 @@ std::string renderMonths (
|
||||
table.setColumnJustification (i + 7, Table::right);
|
||||
}
|
||||
|
||||
// At most, we need 6 rows.
|
||||
table.addRow ();
|
||||
table.addRow ();
|
||||
table.addRow ();
|
||||
table.addRow ();
|
||||
table.addRow ();
|
||||
table.addRow ();
|
||||
|
||||
// Set number of days per month, months to render, and years to render.
|
||||
std::vector<int> years;
|
||||
std::vector<int> months;
|
||||
@@ -1899,7 +1907,7 @@ std::string renderMonths (
|
||||
daysInMonth.push_back (Date::daysInMonth (thisMonth++, thisYear));
|
||||
}
|
||||
|
||||
int row = table.addRow ();
|
||||
int row = 0;
|
||||
|
||||
// Loop through months to be added on this line.
|
||||
for (int c = 0; c < monthsPerLine ; c++)
|
||||
@@ -1940,20 +1948,9 @@ std::string renderMonths (
|
||||
|
||||
// Check for end of week, and...
|
||||
if (dow == 6 && d < daysInMonth.at (c))
|
||||
{
|
||||
// ... Add a row if required, or...
|
||||
if (c == 0)
|
||||
{
|
||||
row = table.addRow ();
|
||||
}
|
||||
// ... Reuse existing row.
|
||||
else
|
||||
{
|
||||
row++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return table.render ();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user