mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-30 11:27:19 +02:00
Duration
- Renamed Duration object to OldDuration so that the two implementations can coexist in a binary.
This commit is contained in:
parent
9bfe40fac7
commit
18f03c25b4
20 changed files with 566 additions and 566 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue