Bug Fix - timesheet end date

- Fixed display of timesheet end date.  It was one day off.
This commit is contained in:
Paul Beckingham 2009-06-27 18:08:09 -04:00
parent 6e4f60c4fe
commit 029b2d1182

View file

@ -1124,7 +1124,7 @@ std::string handleReportTimesheet ()
// Roll back to midnight. // Roll back to midnight.
start = Date (start.month (), start.day (), start.year ()); start = Date (start.month (), start.day (), start.year ());
Date end = start + (7 * 86400) - 1; Date end = start + (7 * 86400);
// Determine how many reports to run. // Determine how many reports to run.
int quantity = 1; int quantity = 1;
@ -1134,11 +1134,13 @@ std::string handleReportTimesheet ()
std::stringstream out; std::stringstream out;
for (int week = 0; week < quantity; ++week) for (int week = 0; week < quantity; ++week)
{ {
Date endString (end);
endString -= 86400;
out << std::endl out << std::endl
<< Text::colorize (Text::bold, Text::nocolor) << Text::colorize (Text::bold, Text::nocolor)
<< start.toString (context.config.get ("dateformat", "m/d/Y")) << start.toString (context.config.get ("dateformat", "m/d/Y"))
<< " - " << " - "
<< end.toString (context.config.get ("dateformat", "m/d/Y")) << endString.toString (context.config.get ("dateformat", "m/d/Y"))
<< Text::colorize () << Text::colorize ()
<< std::endl; << std::endl;