-
Bug
-
Resolution: Fixed
-
Medium
-
4.0.1
-
None
-
4
-
The calendar in the date picker numbers weeks (along the left). However it gets the week numbers wrong. It seems to be trying to implement the numbering scheme described in ISO-8601 (see this summary):
/** Returns the number of the week in year, as defined in ISO 8601. */ Date.prototype.getWeekNumber = function() { var d = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0); var DoW = d.getDay(); d.setDate(d.getDate() - (DoW + 6) % 7 + 3); // Nearest Thu var ms = d.valueOf(); // GMT d.setMonth(0); d.setDate(4); // Thu in Week 1 return Math.round((ms - d.valueOf()) / (7 * 864e5)) + 1; };
However it seems to be buggy (see for example week numbers in 2004).
update:
There is a workaround for this issue in 3.13.x and 4.0.x. Thanks to Bettina Zucker for this solution. See the comment here.
- duplicates
-
JRASERVER-19946 Wrong calender week is displayed
- Gathering Impact
- is duplicated by
-
JRASERVER-59423 Week number in date picker is wrong, from Jan 2016
- Closed
-
JRASERVER-20014 JIRA calendar has a first day of the week bug ... dpending on how its call
- Closed
-
JRASERVER-20947 Date picker shows week number off by one
- Closed
-
JRASERVER-19282 calendar issue: In the Netherlands the first week of 2010 should start on Monday January fourth.
- Closed
- is related to
-
JRASERVER-20947 Date picker shows week number off by one
- Closed
- relates to
-
JRASERVER-9048 Calendar week begins with sunday independently from locale
- Closed
-
JRASERVER-23398 Created vs Resolved Issues Report week number wrong on edge of year
- Gathering Impact
-
JRASERVER-25061 Recently Created Chart with weekly period shows issues shifted forwards by one week
- Gathering Impact