[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#781281: marked as done (wheezy-pu: package gnome-shell/3.4.2-7+deb7u2)



Your message dated Sat, 05 Sep 2015 14:33:54 +0100
with message-id <1441460034.2151.33.camel@adam-barratt.org.uk>
and subject line Closing bugs for 7.9
has caused the Debian Bug report #781281,
regarding wheezy-pu: package gnome-shell/3.4.2-7+deb7u2
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
781281: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=781281
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
Tags: wheezy
User: release.debian.org@packages.debian.org
Usertags: pu

Hi,

I’m proposing a small update of gnome-shell in wheezy to fix an annoying 
bug in the week number computation that is triggered in 2015.

gnome-shell (3.4.2-7+deb7u2) stable; urgency=low

  * 29_week_number.patch: backported patch from upstream.
    Fix week number computation, which is wrong in 2015.

Thanks for considering,
-- 
 .''`.        Josselin Mouette
: :' :
`. `'
  `-
Backported from 412d40f8448e0f83cd6bfd6c4841b25b010378d7

https://bugzilla.gnome.org/show_bug.cgi?id=736722

Index: gnome-shell-3.4.2/js/ui/calendar.js
===================================================================
--- gnome-shell-3.4.2.orig/js/ui/calendar.js	2015-03-26 21:34:47.064453237 +0100
+++ gnome-shell-3.4.2/js/ui/calendar.js	2015-03-26 21:34:23.752826288 +0100
@@ -78,23 +78,6 @@ function _formatEventTime(event, clockFo
     return ret;
 }
 
-function _getCalendarWeekForDate(date) {
-    // Based on the algorithms found here:
-    // http://en.wikipedia.org/wiki/Talk:ISO_week_date
-    let midnightDate = new Date(date.getFullYear(), date.getMonth(), date.getDate());
-    // Need to get Monday to be 1 ... Sunday to be 7
-    let dayOfWeek = 1 + ((midnightDate.getDay() + 6) % 7);
-    let nearestThursday = new Date(midnightDate.getFullYear(), midnightDate.getMonth(),
-                                   midnightDate.getDate() + (4 - dayOfWeek));
-
-    let jan1st = new Date(nearestThursday.getFullYear(), 0, 1);
-    let diffDate = nearestThursday - jan1st;
-    let dayNumber = Math.floor(Math.abs(diffDate) / MSECS_IN_DAY);
-    let weekNumber = Math.floor(dayNumber / 7) + 1;
-
-    return weekNumber;
-}
-
 function _getDigitWidth(actor){
     let context = actor.get_pango_context();
     let themeNode = actor.get_theme_node();
@@ -592,7 +575,7 @@ const Calendar = new Lang.Class({
                            { row: row, col: offsetCols + (7 + iter.getDay() - this._weekStart) % 7 });
 
             if (this._useWeekdate && iter.getDay() == 4) {
-                let label = new St.Label({ text: _getCalendarWeekForDate(iter).toString(),
+                let label = new St.Label({ text: iter.toLocaleFormat('%V'),
                                            style_class: 'calendar-day-base calendar-week-number'});
                 this.actor.add(label,
                                { row: row, col: 0, y_align: St.Align.MIDDLE });

--- End Message ---
--- Begin Message ---
Version: 7.9

Hi,

These bugs relate to updates which were included in the 7.9 point
release.

Regards,

Adam

--- End Message ---

Reply to: