mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Timeline: Described procedure for generating ::tracked output
This commit is contained in:
parent
716d32c8a8
commit
18524fa8c8
1 changed files with 25 additions and 3 deletions
|
@ -69,14 +69,36 @@ void Timeline::exclude (const Exclusion& exclusion)
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
std::vector <Interval> Timeline::tracked (Rules& rules) const
|
std::vector <Interval> Timeline::tracked (Rules& rules) const
|
||||||
{
|
{
|
||||||
|
// TODO Create a range representing the whole timeline.
|
||||||
|
|
||||||
|
// TODO Intersect this range with the outer range of all inclusions.
|
||||||
|
|
||||||
|
// TODO Obtain holidays.
|
||||||
|
// TODO for each exclusion:
|
||||||
|
// TODO if "exc day off <date>":
|
||||||
|
// TODO add <date> as a holiday.
|
||||||
|
// TODO if "exc day on <date>":
|
||||||
|
// TODO if <date> matches a holiday:
|
||||||
|
// TODO remove <date> as a holiday
|
||||||
|
|
||||||
|
// TODO for each inclusion:
|
||||||
|
// TODO for each holiday:
|
||||||
|
// TODO intersect intelligently.
|
||||||
|
|
||||||
|
// TODO for each exclusion:
|
||||||
|
// TODO generate a set of ranges to exclude.
|
||||||
|
// TODO for each excluded range:
|
||||||
|
// TODO intersect intelligently.
|
||||||
|
|
||||||
|
// TODO Return results, which should be the stored inclusions, clipped by
|
||||||
|
// subtracting all the exclusions nad holidays.
|
||||||
|
|
||||||
/*
|
/*
|
||||||
std::vector <Interval> combined;
|
std::vector <Interval> combined;
|
||||||
|
|
||||||
// TODO Combine _inclusions and _exclusions to yield a set of collapsed
|
|
||||||
// intervals.
|
|
||||||
|
|
||||||
return combined;
|
return combined;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
return _inclusions;
|
return _inclusions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue