- Converted from OldDuration to Duration.
This commit is contained in:
Paul Beckingham 2014-05-28 23:46:09 -04:00
parent c103f22513
commit 0fba1957c2

View file

@ -30,7 +30,7 @@
#include <Context.h> #include <Context.h>
#include <Filter.h> #include <Filter.h>
#include <Date.h> #include <Date.h>
#include <OldDuration.h> #include <Duration.h>
#include <ViewText.h> #include <ViewText.h>
#include <main.h> #include <main.h>
#include <text.h> #include <text.h>
@ -231,7 +231,7 @@ int CmdInfo::execute (std::string& output)
if (created.length ()) if (created.length ())
{ {
Date dt (strtol (created.c_str (), NULL, 10)); Date dt (strtol (created.c_str (), NULL, 10));
age = OldDuration (now - dt).format (); age = Duration (now - dt).format ();
} }
view.set (row, 1, entry + " (" + age + ")"); view.set (row, 1, entry + " (" + age + ")");
@ -291,7 +291,7 @@ int CmdInfo::execute (std::string& output)
view.set (row, 0, STRING_CMD_INFO_MODIFIED); view.set (row, 0, STRING_CMD_INFO_MODIFIED);
Date mod (task->get_date ("modified")); Date mod (task->get_date ("modified"));
std::string age = OldDuration (now - mod).format (); std::string age = Duration (now - mod).format ();
view.set (row, 1, mod.toString (dateformat) + " (" + age + ")"); view.set (row, 1, mod.toString (dateformat) + " (" + age + ")");
} }
@ -340,7 +340,7 @@ int CmdInfo::execute (std::string& output)
if (type == "date") if (type == "date")
value = Date (value).toString (dateformat); value = Date (value).toString (dateformat);
else if (type == "duration") else if (type == "duration")
value = OldDuration (value).formatCompact (); value = Duration (value).formatCompact ();
view.set (row, 1, value); view.set (row, 1, value);
} }
@ -436,7 +436,7 @@ int CmdInfo::execute (std::string& output)
{ {
row = journal.addRow (); row = journal.addRow ();
journal.set (row, 0, STRING_CMD_INFO_TOTAL_ACTIVE); journal.set (row, 0, STRING_CMD_INFO_TOTAL_ACTIVE);
journal.set (row, 1, OldDuration (total_time).formatPrecise (), journal.set (row, 1, Duration (total_time).formatPrecise (),
(context.color () ? Color ("bold") : Color ())); (context.color () ? Color ("bold") : Color ()));
} }
} }