mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
data: Added getFullDay
This commit is contained in:
parent
d298ccfba6
commit
bb1bf55d37
2 changed files with 12 additions and 0 deletions
11
src/data.cpp
11
src/data.cpp
|
@ -656,3 +656,14 @@ Interval getLatestInterval (Database& database)
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
Range getFullDay (const Datetime& day)
|
||||||
|
{
|
||||||
|
int y;
|
||||||
|
int m;
|
||||||
|
int d;
|
||||||
|
day.toYMD (y, m, d);
|
||||||
|
return Range (Datetime (y, m, d, 0, 0, 0),
|
||||||
|
Datetime (y, m, d, 23, 59, 59));
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -54,6 +54,7 @@ Interval clip (const Interval&, const Range&);
|
||||||
std::vector <Interval> getTrackedIntervals (Database&, const Rules&, Interval&);
|
std::vector <Interval> getTrackedIntervals (Database&, const Rules&, Interval&);
|
||||||
std::vector <Range> getUntrackedRanges (const Rules&);
|
std::vector <Range> getUntrackedRanges (const Rules&);
|
||||||
Interval getLatestInterval (Database&);
|
Interval getLatestInterval (Database&);
|
||||||
|
Range getFullDay (const Datetime&);
|
||||||
|
|
||||||
// init.cpp
|
// init.cpp
|
||||||
bool lightweightVersionCheck (int, const char**);
|
bool lightweightVersionCheck (int, const char**);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue