- New 'modified' attribute, which contains the most recent modification date,
  if a modification has occurred.
This commit is contained in:
Paul Beckingham 2012-09-27 00:56:41 -04:00
parent 8d8bd653fa
commit bb167b2275
12 changed files with 139 additions and 4 deletions

View file

@ -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;