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

DayOfYear in bengali throws FormatException #257

Open
DaVaMa1 opened this issue Nov 27, 2023 · 1 comment
Open

DayOfYear in bengali throws FormatException #257

DaVaMa1 opened this issue Nov 27, 2023 · 1 comment

Comments

@DaVaMa1
Copy link

DaVaMa1 commented Nov 27, 2023

Describe the bug

In the bengali (bn) locale, calling .dayOfYear will throw.

Unhandled exception:
FormatException: Invalid radix-10 number (at character 1)
৩২৯

In Sentry the tokens are represented as ٣٣١. Not sure where the difference comes from. edit: these are just numbers for the actual dayOfYear value.

How to reproduce the bug

edit: I thought it was only certain days, but it is any day.

    final date = Jiffy.parseFromDateTime(DateTime(2023, 11, 27));
    print(date.dayOfYear);

What is the expected behavior

The day of the year in the respective locale is returned

Additional information

I'll reach out to my own localization team for some more info as I don't speak any Bengali. The bug has little prio for me atm as it won't be relevant after today to fix for almost a year.

I'll dig into the code a little bit and the translations to see if I can fix it myself, but that might take a bit.

@DaVaMa1 DaVaMa1 changed the title DayOfYear with value 331 in bengali throws FormatException DayOfYear in bengali throws FormatException Nov 27, 2023
@DaVaMa1
Copy link
Author

DaVaMa1 commented Nov 27, 2023

Might be related to 103.

After some experimenting I think it also throws in other non roman locales

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant