mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
CmdReportWeek: Implemented
This commit is contained in:
parent
0b6814e82b
commit
9a94d0364f
3 changed files with 14 additions and 42 deletions
|
@ -19,7 +19,6 @@ set (commands_SRCS CmdCancel.cpp
|
||||||
CmdReport.cpp
|
CmdReport.cpp
|
||||||
CmdReportDay.cpp
|
CmdReportDay.cpp
|
||||||
CmdReportMonth.cpp
|
CmdReportMonth.cpp
|
||||||
CmdReportWeek.cpp
|
|
||||||
CmdStart.cpp
|
CmdStart.cpp
|
||||||
CmdStop.cpp
|
CmdStop.cpp
|
||||||
CmdReportSummary.cpp
|
CmdReportSummary.cpp
|
||||||
|
|
|
@ -43,6 +43,20 @@ static void renderExclusionBlocks (const std::string&, const Rules&, std::vector
|
||||||
static void renderInterval (const std::string&, const Rules&, std::vector <Composite>&, const Datetime&, const Interval&, Palette&, std::map <std::string, Color>&, time_t&);
|
static void renderInterval (const std::string&, const Rules&, std::vector <Composite>&, const Datetime&, const Interval&, Palette&, std::map <std::string, Color>&, time_t&);
|
||||||
static void renderSummary (const std::string&, const Interval&, const std::vector <Range>&, const std::vector <Interval>&);
|
static void renderSummary (const std::string&, const Interval&, const std::vector <Range>&, const std::vector <Interval>&);
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
int CmdReportWeek (
|
||||||
|
const CLI& cli,
|
||||||
|
Rules& rules,
|
||||||
|
Database& database)
|
||||||
|
{
|
||||||
|
// Create a filter, and if empty, choose the current month.
|
||||||
|
auto filter = getFilter (cli);
|
||||||
|
if (! filter.range.is_started ())
|
||||||
|
filter.range = Range (Datetime ("socw"), Datetime ("eocw"));
|
||||||
|
|
||||||
|
return renderReport ("week", filter, rules, database);
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int CmdReportMonth (
|
int CmdReportMonth (
|
||||||
const CLI& cli,
|
const CLI& cli,
|
||||||
|
|
|
@ -1,41 +0,0 @@
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Copyright 2015 - 2016, Paul Beckingham, Federico Hernandez.
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
|
||||||
// in the Software without restriction, including without limitation the rights
|
|
||||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
// copies of the Software, and to permit persons to whom the Software is
|
|
||||||
// furnished to do so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included
|
|
||||||
// in all copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
||||||
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
//
|
|
||||||
// http://www.opensource.org/licenses/mit-license.php
|
|
||||||
//
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#include <cmake.h>
|
|
||||||
#include <commands.h>
|
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
int CmdReportWeek (
|
|
||||||
const CLI& cli,
|
|
||||||
Rules& rules,
|
|
||||||
Database& database)
|
|
||||||
{
|
|
||||||
std::cout << "# CmdReportWeek\n";
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
Loading…
Add table
Add a link
Reference in a new issue