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.
This commit is contained in:
John Ralls 2017-03-21 10:29:17 -07:00
parent 7e65496a5f
commit 70a97ee03d
2 changed files with 0 additions and 4 deletions

View File

@ -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); 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; day_of_month_index = g_date_get_day(&date) - 1;
week = day_of_month_index / 7 > 3 ? 3 : day_of_month_index / 7; 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 /* translators: %s is the string 1st, 2nd, 3rd and so on, and
* %s is an already-localized form of the day of the week. */ * %s is an already-localized form of the day of the week. */
g_string_append_printf(buf, _("%s %s"), _(numerals[week]), day_name_buf); g_string_append_printf(buf, _("%s %s"), _(numerals[week]), day_name_buf);

View File

@ -434,8 +434,6 @@ _get_monthly_combobox_index(Recurrence *r)
else if (recurrenceGetPeriodType(r) == PERIOD_NTH_WEEKDAY) else if (recurrenceGetPeriodType(r) == PERIOD_NTH_WEEKDAY)
{ {
week = day_of_month_index / 7 > 3 ? 3 : day_of_month_index / 7; 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 + day_of_month_index = LAST_DAY_OF_MONTH_OPTION_INDEX + 7 +
g_date_get_weekday(&recurrence_date) + 7 * week; g_date_get_weekday(&recurrence_date) + 7 * week;