mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
- For "task calendar", the month names are now centered over the month.
This commit is contained in:
parent
bb7f48496a
commit
4d1cdf0270
1 changed files with 8 additions and 7 deletions
|
@ -1816,13 +1816,14 @@ void handleReportCalendar (TDB& tdb, T& task, Config& conf)
|
||||||
for (int i = 0 ; i < monthsPerLine ; i++)
|
for (int i = 0 ; i < monthsPerLine ; i++)
|
||||||
{
|
{
|
||||||
std::string month = Date::monthName (nextM);
|
std::string month = Date::monthName (nextM);
|
||||||
std::cout << month
|
int left = (18 - month.length ()) / 2 + 1;
|
||||||
<< " "
|
int right = 18 - left - month.length ();
|
||||||
<< std::setw(23 // one month's output width
|
|
||||||
- month.length ()// month name length
|
std::cout << std::setw (left) << ' '
|
||||||
- 1)// spacer character
|
<< month
|
||||||
<< std::left
|
<< ' '
|
||||||
<< nextY;
|
<< nextY
|
||||||
|
<< std::setw (right) << ' ';
|
||||||
|
|
||||||
if (++nextM > 12)
|
if (++nextM > 12)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue