mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
CmdReportMonth: Today's date is now highlighted
This commit is contained in:
parent
ccfcf5488b
commit
028399ddb3
1 changed files with 16 additions and 9 deletions
|
@ -109,15 +109,22 @@ int CmdReportMonth (
|
||||||
int hours = work / 3600;
|
int hours = work / 3600;
|
||||||
int minutes = (work % 3600) / 60;
|
int minutes = (work % 3600) / 60;
|
||||||
|
|
||||||
std::cout << (previous.month () != day.month () ? day.monthNameShort (day.month ()) : " ")
|
std::cout << (previous.month () != day.month () ? day.monthNameShort (day.month ()) : " ") << ' '
|
||||||
|
<< (previous.week () != day.week () ? leftJustify (format ("W{1} ", day.week ()), 4) : " ");
|
||||||
|
|
||||||
|
// Today should be highlighted.
|
||||||
|
if (day.sameDay (Datetime ()))
|
||||||
|
std::cout << colorToday.colorize (day.dayNameShort (day.month ()))
|
||||||
<< ' '
|
<< ' '
|
||||||
<< (previous.week () != day.week () ? leftJustify (format ("W{1}", day.week ()), 3) : " ")
|
<< colorToday.colorize (rightJustify (day.day (), 2))
|
||||||
<< ' '
|
<< ' ';
|
||||||
<< day.dayNameShort (day.dayOfWeek ())
|
else
|
||||||
|
std::cout << day.monthNameShort (day.month ())
|
||||||
<< ' '
|
<< ' '
|
||||||
<< rightJustify (day.day (), 2)
|
<< rightJustify (day.day (), 2)
|
||||||
<< ' '
|
<< ' ';
|
||||||
<< lines[0].str ();
|
|
||||||
|
std::cout << lines[0].str ();
|
||||||
|
|
||||||
if (lines.size () > 1)
|
if (lines.size () > 1)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue