mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-26 06:37:20 +02:00
Duration
- Implemented Duration::get_units to return the list of supported duration units (wk, week, weekly ...).
This commit is contained in:
parent
f174caccbc
commit
f502ee0c52
2 changed files with 14 additions and 0 deletions
|
@ -452,3 +452,14 @@ void Duration::parse (const std::string& input)
|
|||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
const std::vector <std::string> Duration::get_units ()
|
||||
{
|
||||
std::vector <std::string> units;
|
||||
for (unsigned int i = 0; i < NUM_DURATIONS; ++i)
|
||||
if (strcmp (durations[i], "-"))
|
||||
units.push_back (durations[i]);
|
||||
|
||||
return units;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue