mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-29 07:57:20 +02:00
Feature
- New 'modified' attribute, which contains the most recent modification date, if a modification has occurred.
This commit is contained in:
parent
8d8bd653fa
commit
bb167b2275
12 changed files with 139 additions and 4 deletions
|
@ -305,6 +305,19 @@ int CmdInfo::execute (std::string& output)
|
|||
view.set (row, 0, STRING_COLUMN_LABEL_URGENCY);
|
||||
view.set (row, 1, trimLeft (format (task->urgency (), 4, 4)));
|
||||
|
||||
// modified
|
||||
if (task->has ("modified"))
|
||||
{
|
||||
row = view.addRow ();
|
||||
view.set (row, 0, STRING_CMD_INFO_MODIFIED);
|
||||
|
||||
Date mod (task->get_date ("modified"));
|
||||
|
||||
std::string age = Duration (now - mod).format ();
|
||||
view.set (row, 1, Date (task->get_date ("modified")).toString (dateformat) +
|
||||
" (" + age + ")");
|
||||
}
|
||||
|
||||
// Show any UDAs
|
||||
std::vector <std::string> all = task->all ();
|
||||
std::vector <std::string>::iterator att;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue