Fix miscalculation of prev_quarter_end for the first quarter.

If the current quarter ends June 30 backing up 3 months from there
gets March 30, one day off. Back up first and calculate the end
of the actual quarter of interest.

Changed pre_quarter_start for consistency, it doesn't matter.
pull/1191/head
John Ralls 6 years ago
parent d1cfd62f31
commit 7dab089d49

@ -1548,15 +1548,15 @@ gnc_gdate_set_quarter_end (GDate *date)
void
gnc_gdate_set_prev_quarter_start (GDate *date)
{
gnc_gdate_set_quarter_start(date);
g_date_subtract_months(date, 3);
gnc_gdate_set_quarter_start(date);
}
void
gnc_gdate_set_prev_quarter_end (GDate *date)
{
gnc_gdate_set_quarter_end(date);
g_date_subtract_months(date, 3);
gnc_gdate_set_quarter_end(date);
}
/* ================================================= */

Loading…
Cancel
Save