AUDIT: r16769 - gnucash/trunk/src/gnome-utils - Bug#506429: Correct widget index offset computation for last-day-of-month SXes.
Josh Sled
jsled at cvs.gnucash.org
Sun Dec 30 10:58:03 EST 2007
Author: jsled
Date: 2007-12-30 10:58:03 -0500 (Sun, 30 Dec 2007)
New Revision: 16769
Trac: http://svn.gnucash.org/trac/changeset/16769
Modified:
gnucash/trunk/src/gnome-utils/gnc-frequency.c
Log:
Bug#506429: Correct widget index offset computation for last-day-of-month SXes.
BP
Modified: gnucash/trunk/src/gnome-utils/gnc-frequency.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-frequency.c 2007-12-30 15:12:16 UTC (rev 16768)
+++ gnucash/trunk/src/gnome-utils/gnc-frequency.c 2007-12-30 15:58:03 UTC (rev 16769)
@@ -509,9 +509,10 @@
if (day_of_month_index > LAST_DAY_OF_MONTH_OPTION_INDEX)
{
GDate *day_of_week_date = g_date_new_julian(g_date_get_julian(start_date));
+ GDateWeekday selected_day_of_week = day_of_month_index - LAST_DAY_OF_MONTH_OPTION_INDEX;
// increment until we align on the DOW, but stay inside the month
g_date_set_day(day_of_week_date, 1);
- while (g_date_get_weekday(day_of_week_date) != (day_of_month_index - 30))
+ while (g_date_get_weekday(day_of_week_date) != selected_day_of_week)
g_date_add_days(day_of_week_date, 1);
recurrenceSet(r, multiplier, PERIOD_LAST_WEEKDAY, day_of_week_date);
}
More information about the gnucash-changes
mailing list