mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Interval: Now has pubic ::range, which has public ::start, ::end
This commit is contained in:
parent
7fe116f75a
commit
63a6255412
17 changed files with 413 additions and 506 deletions
16
src/Range.h
16
src/Range.h
|
@ -37,23 +37,17 @@ public:
|
|||
Range (const Datetime&, const Datetime&);
|
||||
bool operator== (const Range&) const;
|
||||
|
||||
Datetime start () const;
|
||||
void start (const Datetime&);
|
||||
|
||||
Datetime end () const;
|
||||
void end (const Datetime&);
|
||||
|
||||
bool isStarted () const;
|
||||
bool isEnded () const;
|
||||
bool started () const;
|
||||
bool ended () const;
|
||||
bool overlap (const Range&) const;
|
||||
Range intersect (const Range&) const;
|
||||
std::vector <Range> subtract (const Range&) const;
|
||||
|
||||
std::string dump () const;
|
||||
|
||||
private:
|
||||
Datetime _start {0};
|
||||
Datetime _end {0};
|
||||
public:
|
||||
Datetime start {0};
|
||||
Datetime end {0};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue