mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-30 20:37:20 +02:00
Duration
- Cleaned up source formatting.
This commit is contained in:
parent
861cc83e6d
commit
de5f41c6c5
1 changed files with 2 additions and 2 deletions
|
@ -209,10 +209,10 @@ std::string Duration::formatCompact () const
|
|||
|
||||
if (_secs >= 86400 * 365) sprintf (formatted, "%.1fy", (days / 365.0));
|
||||
else if (_secs >= 86400 * 84) sprintf (formatted, "%1dmo", (int) (days / 30));
|
||||
else if (_secs >= 86400 * 13) sprintf (formatted, "%dw", (int) (float) (days / 7.0));
|
||||
else if (_secs >= 86400 * 13) sprintf (formatted, "%dw", (int) (float) (days / 7.0));
|
||||
else if (_secs >= 86400) sprintf (formatted, "%dd", (int) days);
|
||||
else if (_secs >= 3600) sprintf (formatted, "%dh", (int) (_secs / 3600));
|
||||
else if (_secs >= 60) sprintf (formatted, "%dmin", (int) (_secs / 60));
|
||||
else if (_secs >= 60) sprintf (formatted, "%dmin", (int) (_secs / 60));
|
||||
else if (_secs >= 1) sprintf (formatted, "%ds", (int) _secs);
|
||||
else formatted[0] = '\0';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue