support icon indicating copy to clipboard operation
support copied to clipboard

Incorrect week numbers 2025/2026

Open chuckn0rris opened this issue 10 months ago • 3 comments

Forum post

Hello,

We use several custom presets where we show the weeknumbers. Most of our customer prefer weeknumbers over dates. According to your documentation if we use dateFormat: "WW" this should show the ISO weeknumbers. However around the end of 2025, start of 2026 this is not the case.

I reproduced this in an example project, React-vite advanced in v6.1.6 of the Gantt. I added the following code to GanttProps:

  presets:[
        {
            id: "weekDateAndMonth",
            name: "Weeks 3",
            rowHeight: 24,
            tickWidth: 30,
            tickHeight: 40,
            displayDateFormat: "ll",
            shiftUnit: "week",
            shiftIncrement: 1,
            defaultSpan: 10,
            timeResolution: {
            unit: "day",
            increment: 1,
            },
            headers: [
            {
                increment: 1,
                unit: "month",
                dateFormat: "YYYY MMMM",
            },
            {
                increment: 1,
                unit: "week",
                dateFormat: "WW",
            },
            ],
            mainHeaderLevel: 1,
            columnLinesFor: 1,
        },
    ],
    viewPreset: "weekDateAndMonth",

This sets the viewpreset to one that shows weeknumbers. If I then navigate to the end of 2025, I see a week 53. Screenshot 2025-05-13 115301.png

However according to the ISO system(and also for example Outlook), it should go from week 52 to week 1. According to the ISO rule the year of the weeknumber is based on which year thursday falls in. So with thursday being on 1st January 2026, this is week 1. https://en.wikipedia.org/wiki/ISO_week_date

Which should result in: Screenshot 2025-05-13 115831.png

So I think this is a bug. Is there an easy way to implement a custom render function to correct this? Screenshot 2025-05-13 115301.png Screenshot 2025-05-13 115831.png

chuckn0rris avatar May 13 '25 10:05 chuckn0rris

Related to https://github.com/bryntum/support/issues/10991

chuckn0rris avatar May 13 '25 11:05 chuckn0rris

Should be fixed by the ticket @chuckn0rris refers to above, have asked for confirmation

isglass avatar Jun 11 '25 13:06 isglass

@isglass user confirmed the issue is still persists. I will set high-prio back on this.

chuckn0rris avatar Nov 03 '25 15:11 chuckn0rris