Duration
- Renamed Duration object to OldDuration so that the two implementations can coexist in a binary.
This commit is contained in:
@@ -56,7 +56,7 @@ ColumnDate::ColumnDate ()
|
||||
_examples.push_back (format (now.toJulian (), 13, 12));
|
||||
_examples.push_back (now.toEpochString ());
|
||||
_examples.push_back (now.toISO ());
|
||||
_examples.push_back (Duration (Date () - now).formatCompact ());
|
||||
_examples.push_back (OldDuration (Date () - now).formatCompact ());
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -99,7 +99,7 @@ void ColumnDate::measure (Task& task, unsigned int& minimum, unsigned int& maxim
|
||||
{
|
||||
Date date ((time_t) strtol (task.get (_name).c_str (), NULL, 10));
|
||||
Date now;
|
||||
minimum = maximum = Duration (now - date).format ().length ();
|
||||
minimum = maximum = OldDuration (now - date).format ().length ();
|
||||
}
|
||||
else if (_style == "julian")
|
||||
{
|
||||
@@ -116,7 +116,7 @@ void ColumnDate::measure (Task& task, unsigned int& minimum, unsigned int& maxim
|
||||
else if (_style == "age")
|
||||
{
|
||||
Date now;
|
||||
minimum = maximum = Duration (now - date).formatCompact ().length ();
|
||||
minimum = maximum = OldDuration (now - date).formatCompact ().length ();
|
||||
}
|
||||
else
|
||||
throw format (STRING_COLUMN_BAD_FORMAT, _name, _style);
|
||||
@@ -159,7 +159,7 @@ void ColumnDate::render (
|
||||
lines.push_back (
|
||||
color.colorize (
|
||||
rightJustify (
|
||||
Duration (now - date).format (), width)));
|
||||
OldDuration (now - date).format (), width)));
|
||||
}
|
||||
else if (_style == "julian")
|
||||
{
|
||||
@@ -193,7 +193,7 @@ void ColumnDate::render (
|
||||
lines.push_back (
|
||||
color.colorize (
|
||||
leftJustify (
|
||||
Duration (now - date).formatCompact (), width)));
|
||||
OldDuration (now - date).formatCompact (), width)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ ColumnDue::ColumnDue ()
|
||||
|
||||
Date now;
|
||||
now += 125;
|
||||
_examples.push_back (Duration (now - Date ()).formatCompact ());
|
||||
_examples.push_back (OldDuration (now - Date ()).formatCompact ());
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -81,7 +81,7 @@ void ColumnRecur::measure (Task& task, unsigned int& minimum, unsigned int& maxi
|
||||
if (_style == "default" ||
|
||||
_style == "duration")
|
||||
{
|
||||
minimum = maximum = Duration (task.get ("recur")).formatCompact ().length ();
|
||||
minimum = maximum = OldDuration (task.get ("recur")).formatCompact ().length ();
|
||||
}
|
||||
else if (_style == "indicator")
|
||||
{
|
||||
@@ -105,7 +105,7 @@ void ColumnRecur::render (
|
||||
lines.push_back (
|
||||
color.colorize (
|
||||
rightJustify (
|
||||
Duration (task.get ("recur")).formatCompact (),
|
||||
OldDuration (task.get ("recur")).formatCompact (),
|
||||
width)));
|
||||
}
|
||||
else if (_style == "indicator")
|
||||
|
||||
@@ -45,7 +45,7 @@ ColumnScheduled::ColumnScheduled ()
|
||||
|
||||
Date now;
|
||||
now += 125;
|
||||
_examples.push_back (Duration (now - Date ()).formatCompact ());
|
||||
_examples.push_back (OldDuration (now - Date ()).formatCompact ());
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -102,7 +102,7 @@ void ColumnUDA::measure (Task& task, unsigned int& minimum, unsigned int& maximu
|
||||
}
|
||||
else if (_type == "duration")
|
||||
{
|
||||
minimum = maximum = utf8_width (Duration (value).formatCompact ());
|
||||
minimum = maximum = utf8_width (OldDuration (value).formatCompact ());
|
||||
}
|
||||
else if (_type == "string")
|
||||
{
|
||||
@@ -155,7 +155,7 @@ void ColumnUDA::render (
|
||||
lines.push_back (
|
||||
color.colorize (
|
||||
rightJustify (
|
||||
Duration (value).formatCompact (),
|
||||
OldDuration (value).formatCompact (),
|
||||
width)));
|
||||
}
|
||||
else if (_type == "string")
|
||||
|
||||
Reference in New Issue
Block a user