kopia lustrzana https://gitlab.com/tomaszg/geostat
Do not include in the tables days that are not in the calendar
rodzic
dcbd57e22e
commit
babd56a70f
|
@ -470,9 +470,12 @@ int main(int argc, char** argv) {
|
|||
std::cout << "<tr><th>" << i << "</th> ";
|
||||
for (int j = 1; j <= 31; j++) { // j -> days in cols
|
||||
count = std::count_if(cc.begin(), cc.end(), [i, j](Cache c) { return (c.date_tm.tm_mon == i - 1 && c.date_tm.tm_mday == j); });
|
||||
if (count == 0)
|
||||
std::cout << "<td class=\"dt_zero\">" << 0 << "</td>";
|
||||
else
|
||||
if (count == 0) {
|
||||
if ((j == 31 && (i == 2 || i == 4 || i == 6 || i == 9 || i == 11)) || (j == 30 && i == 2))
|
||||
std::cout << "<td class=\"dt_null\"></td>";
|
||||
else
|
||||
std::cout << "<td class=\"dt_zero\">" << 0 << "</td>";
|
||||
} else
|
||||
std::cout << "<td>" << count << "</td>";
|
||||
}
|
||||
std::cout << "</tr>\n";
|
||||
|
|
Ładowanie…
Reference in New Issue