gnucash maint: Bug 778208 - Scheduling 2nd, 3rd or 4th Wed doesn't seem to work.

John Ralls jralls at code.gnucash.org
Tue Mar 21 13:35:47 EDT 2017


Updated	 via  https://github.com/Gnucash/gnucash/commit/70a97ee0 (commit)
	from  https://github.com/Gnucash/gnucash/commit/7e65496a (commit)



commit 70a97ee03d46df6e7707b6319851403592023bb9
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Mar 21 10:29:17 2017 -0700

    Bug 778208 - Scheduling 2nd, 3rd or 4th Wed doesn't seem to work.
    
    Remove incorrect week adjustments for determining n for nth weekday
    from a recurrence date when day % 7 == 0. Adjustment is only needed
    in nth_weekday_compare because that function then adds 7 to the result.

diff --git a/src/engine/Recurrence.c b/src/engine/Recurrence.c
index e3aadca..5633f4e 100644
--- a/src/engine/Recurrence.c
+++ b/src/engine/Recurrence.c
@@ -645,8 +645,6 @@ _monthly_append_when(Recurrence *r, GString *buf)
         gnc_dow_abbrev(day_name_buf, abbrev_day_name_bufsize, g_date_get_weekday(&date) % 7);
         day_of_month_index = g_date_get_day(&date) - 1;
         week = day_of_month_index / 7 > 3 ? 3 : day_of_month_index / 7;
-        if (week > 0 && day_of_month_index % 7 == 0)
-            --week;
         /* translators: %s is the string 1st, 2nd, 3rd and so on, and
          * %s is an already-localized form of the day of the week. */
         g_string_append_printf(buf, _("%s %s"), _(numerals[week]), day_name_buf);
diff --git a/src/gnome-utils/gnc-frequency.c b/src/gnome-utils/gnc-frequency.c
index b5e88d2..aeb50c4 100644
--- a/src/gnome-utils/gnc-frequency.c
+++ b/src/gnome-utils/gnc-frequency.c
@@ -434,8 +434,6 @@ _get_monthly_combobox_index(Recurrence *r)
     else if (recurrenceGetPeriodType(r) == PERIOD_NTH_WEEKDAY)
     {
         week = day_of_month_index / 7 > 3 ? 3 : day_of_month_index / 7;
-        if (week > 0 && day_of_month_index % 7 == 0)
-            --week;
         day_of_month_index = LAST_DAY_OF_MONTH_OPTION_INDEX + 7 +
                              g_date_get_weekday(&recurrence_date) + 7 * week;
 



Summary of changes:
 src/engine/Recurrence.c         | 2 --
 src/gnome-utils/gnc-frequency.c | 2 --
 2 files changed, 4 deletions(-)



More information about the gnucash-changes mailing list