- Uses a simpler contructor.
This commit is contained in:
Paul Beckingham 2014-05-28 20:59:30 -04:00
parent 67d42b5241
commit dbbbeb102e

View file

@ -262,7 +262,7 @@ const std::string Date::toString (
////////////////////////////////////////////////////////////////////////////////
Date Date::startOfDay () const
{
return Date (month (), day (), year (), 0, 0, 0);
return Date (month (), day (), year ());
}
////////////////////////////////////////////////////////////////////////////////
@ -270,19 +270,19 @@ Date Date::startOfWeek () const
{
Date sow (_t);
sow -= (dayOfWeek () * 86400);
return Date (sow.month (), sow.day (), sow.year (), 0, 0, 0);
return Date (sow.month (), sow.day (), sow.year ());
}
////////////////////////////////////////////////////////////////////////////////
Date Date::startOfMonth () const
{
return Date (month (), 1, year (), 0, 0, 0);
return Date (month (), 1, year ());
}
////////////////////////////////////////////////////////////////////////////////
Date Date::startOfYear () const
{
return Date (1, 1, year (), 0, 0, 0);
return Date (1, 1, year ());
}
////////////////////////////////////////////////////////////////////////////////