mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-28 13:37:20 +02:00
Blank Durations
- Instead of dispalying '-' for a zero-length duration, nothing is ('') is displayed instead. This allows a completely empty duration column to be culled by the rc.print.empty.columns=no feature. - Unit tests updated accordingly.
This commit is contained in:
parent
089b3e7d66
commit
330761e997
4 changed files with 27 additions and 26 deletions
|
@ -282,7 +282,7 @@ std::string Duration::formatCompact () const
|
|||
else if (_secs >= 3600) sprintf (formatted, "%s%dh", (_negative ? "-" : ""), (int) (_secs / 3600));
|
||||
else if (_secs >= 60) sprintf (formatted, "%s%dm", (_negative ? "-" : ""), (int) (_secs / 60));
|
||||
else if (_secs >= 1) sprintf (formatted, "%s%ds", (_negative ? "-" : ""), (int) _secs);
|
||||
else strcpy (formatted, "-");
|
||||
else formatted[0] = '\0';
|
||||
|
||||
return std::string (formatted);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue