diff --git a/evolution-year-view-week-number.patch b/evolution-year-view-week-number.patch new file mode 100644 index 0000000..edd41b8 --- /dev/null +++ b/evolution-year-view-week-number.patch @@ -0,0 +1,53 @@ +From 4af3f6833b252f713fe19a531008d6451064701b Mon Sep 17 00:00:00 2001 +From: Milan Crha +Date: Wed, 4 Feb 2026 08:35:22 +0100 +Subject: [PATCH] I#3238 - Calendar: Year view shows incorrect week number + +Closes https://gitlab.gnome.org/GNOME/evolution/-/issues/3238 +--- + src/e-util/e-month-widget.c | 16 +++------------- + 1 file changed, 3 insertions(+), 13 deletions(-) + +diff --git a/src/e-util/e-month-widget.c b/src/e-util/e-month-widget.c +index ed8ecf6b8f..12d765c2e1 100644 +--- a/src/e-util/e-month-widget.c ++++ b/src/e-util/e-month-widget.c +@@ -161,32 +161,22 @@ e_month_widget_update (EMonthWidget *self) + GDate *date, tmp_date; + GtkWidget *widget; + gchar buffer[128]; +- guint week_of_year, week_of_last_year = 0; + guint ii, jj, month_day, max_month_days; + + if (!digit_format) + digit_format = get_digit_format (); + + date = g_date_new_dmy (1, self->priv->month, self->priv->year); +- +- if (self->priv->week_start_day == G_DATE_SUNDAY) { +- week_of_year = g_date_get_sunday_week_of_year (date); +- if (!week_of_year) +- week_of_last_year = g_date_get_sunday_weeks_in_year (self->priv->year - 1); +- } else { +- week_of_year = g_date_get_monday_week_of_year (date); +- if (!week_of_year) +- week_of_last_year = g_date_get_monday_weeks_in_year (self->priv->year - 1); +- } ++ tmp_date = *date; + + /* Update week numbers */ + for (ii = 0; ii < MAX_WEEKS; ii++) { +- g_snprintf (buffer, sizeof (buffer), digit_format, !week_of_year ? week_of_last_year : week_of_year); ++ g_snprintf (buffer, sizeof (buffer), digit_format, g_date_get_iso8601_week_of_year (&tmp_date)); + + widget = gtk_grid_get_child_at (self->priv->grid, 0, ii + 1); + gtk_label_set_text (GTK_LABEL (widget), buffer); + +- week_of_year++; ++ g_date_add_days (&tmp_date, 7); + } + + /* Update day names */ +-- +2.52.0 + diff --git a/evolution.changes b/evolution.changes index ac47eea..38cfd01 100644 --- a/evolution.changes +++ b/evolution.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Feb 4 14:46:58 UTC 2026 - Michael Gorse + +- Add evolution-year-view-week-number.patch: fix incorrect week + numbers in calendar year view (bsc#1256465 + glgo#GNOME/evolution#3238). + ------------------------------------------------------------------- Tue Oct 28 19:40:36 UTC 2025 - Michael Gorse diff --git a/evolution.spec b/evolution.spec index 8c994ca..831e877 100644 --- a/evolution.spec +++ b/evolution.spec @@ -33,6 +33,8 @@ Source0: %{name}-%{version}.tar.zst Patch0: evolution-fix-gtk-call-from-other-thread.patch # PATCH-FIX-UPSTREAM evolution-fix-javascript-code.patch bsc#1252722 mgorse@suse.com -- fix JavaScript dictionary objects creation. Patch1: evolution-fix-javascript-code.patch +# PATCH-FIX-UPSTREAM evolution-year-view-week-number.patch bsc#1256465 mgorse@suse.com -- fix incorrect week numbers in calendar year view. +Patch2: evolution-year-view-week-number.patch BuildRequires: bison BuildRequires: bogofilter