Skip to content
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

Week numbers don't follow locale standard #15399

Open
PooSham opened this issue Feb 25, 2025 · 0 comments
Open

Week numbers don't follow locale standard #15399

PooSham opened this issue Feb 25, 2025 · 0 comments
Assignees
Labels
🐛 bug Any issue that describes a bug 📆 calendar 🆕 status: new

Comments

@PooSham
Copy link

PooSham commented Feb 25, 2025

Description

According to ISO 8601, the current week number (as of february 25, 2025) should be 9, but igx-calendar with [showWeekNumbers]="true" puts it at 8. This is because there are different standards for week numbers. In Europe, Asia and Oceania, we mostly follow ISO 8601, where the week that contains a Thursday on January 1-4 will be numbered as week 1 (Monday is weekday 1 in this standard). What igniteui seems to follow is called the "Western traditional", where the week that contains a Saturday after January 1 becomes week 1 (Sunday is weekday 1 in this standard).

It would be nice if igniteui could look at the locale, or at least give options, to change the week numbers.

  • igniteui-angular version: 19.0.7
  • browser: Firefox, Chrome

Steps to reproduce

  1. Create the following component: `<igx-calendar [showWeekNumbers]="true" locale="sv-SE" />
  2. Look at January 1st 2025, what's the week number?

Result

The week number for january 1st 2025 shows 53

Expected result

The week number for january 1st 2025 should show 1

If it's too hard to create different rules for different locales, having an option would be OK.

More information

Read about different systems here:

https://en.wikipedia.org/wiki/Week#Other_week_numbering_systems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Any issue that describes a bug 📆 calendar 🆕 status: new
Projects
None yet
Development

No branches or pull requests

3 participants