mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
- Corrected the "30 days in August" bug.
- Removed odd styling from task.html CSS.
This commit is contained in:
parent
d1ef0d17d5
commit
a4304c97af
2 changed files with 16 additions and 20 deletions
23
src/task.cpp
23
src/task.cpp
|
@ -1878,6 +1878,14 @@ std::string renderMonths (
|
||||||
table.setColumnJustification (i + 7, Table::right);
|
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.
|
// Set number of days per month, months to render, and years to render.
|
||||||
std::vector<int> years;
|
std::vector<int> years;
|
||||||
std::vector<int> months;
|
std::vector<int> months;
|
||||||
|
@ -1899,10 +1907,10 @@ std::string renderMonths (
|
||||||
daysInMonth.push_back (Date::daysInMonth (thisMonth++, thisYear));
|
daysInMonth.push_back (Date::daysInMonth (thisMonth++, thisYear));
|
||||||
}
|
}
|
||||||
|
|
||||||
int row = table.addRow ();
|
int row = 0;
|
||||||
|
|
||||||
// Loop through months to be added on this line.
|
// Loop through months to be added on this line.
|
||||||
for (int c = 0 ; c < monthsPerLine ; c++)
|
for (int c = 0; c < monthsPerLine ; c++)
|
||||||
{
|
{
|
||||||
// Reset row counter for subsequent months
|
// Reset row counter for subsequent months
|
||||||
if (c != 0)
|
if (c != 0)
|
||||||
|
@ -1940,20 +1948,9 @@ std::string renderMonths (
|
||||||
|
|
||||||
// Check for end of week, and...
|
// Check for end of week, and...
|
||||||
if (dow == 6 && d < daysInMonth.at (c))
|
if (dow == 6 && d < daysInMonth.at (c))
|
||||||
{
|
|
||||||
// ... Add a row if required, or...
|
|
||||||
if (c == 0)
|
|
||||||
{
|
|
||||||
row = table.addRow ();
|
|
||||||
}
|
|
||||||
// ... Reuse existing row.
|
|
||||||
else
|
|
||||||
{
|
|
||||||
row++;
|
row++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return table.render ();
|
return table.render ();
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,7 +74,6 @@ body {
|
||||||
#content h4 {
|
#content h4 {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
margin: 1.2em 0 0.3em;
|
margin: 1.2em 0 0.3em;
|
||||||
border-bottom: 1px dotted #bbb;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#content h5 {
|
#content h5 {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue