Skip to content

Incorrect week numbers 2025/2026 #11334

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
chuckn0rris opened this issue May 13, 2025 · 1 comment
Open

Incorrect week numbers 2025/2026 #11334

chuckn0rris opened this issue May 13, 2025 · 1 comment
Labels
bug Something isn't working forum Issues from forum large-account Reported by large customer OEM OEM customer

Comments

@chuckn0rris
Copy link

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 chuckn0rris added bug Something isn't working forum Issues from forum large-account Reported by large customer OEM OEM customer labels May 13, 2025
@chuckn0rris
Copy link
Author

Related to #10991

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working forum Issues from forum large-account Reported by large customer OEM OEM customer
Projects
None yet
Development

No branches or pull requests

1 participant