-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Incorrect DateTimeFormat for nb-NO in Blazor WebAssembly #67115
Comments
Tagging subscribers to this area: @dotnet/area-system-globalization Issue DetailsDescriptionGetting month and day names returns incorrect values. Reproduction Stepsvar culture = CultureInfo.GetCulture("nb-NO");
// Should return 'mars', returns 'M03'
var march= culture.DateTimeFormat.GetMonthName(3);
// Should return 'tirsdag', returns 'Tuesday'
var tuesday = culture.DateTimeFormat.DayNames[2]; Expected behaviorShould return the correct values Actual behaviorReturns incorrect values Regression?No response Known WorkaroundsNo response Configuration.net 6 Other informationNo response
|
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsDescriptionGetting month and day names returns incorrect values. Reproduction Stepsvar culture = CultureInfo.GetCulture("nb-NO");
// Should return 'mars', returns 'M03'
var march= culture.DateTimeFormat.GetMonthName(3);
// Should return 'tirsdag', returns 'Tuesday'
var tuesday = culture.DateTimeFormat.DayNames[2]; Expected behaviorShould return the correct values Actual behaviorReturns incorrect values Regression?No response Known WorkaroundsNo response Configuration.net 6 Other informationNo response
|
CC @lewing |
This is likely a result of the way we strip down the formatting data for size reasons. Can you explain your use case to help us prioritize changes? |
In my case I became aware of the problem because I was using the 'BlazorDateRangePicker' in an application, and it was giving me a calendar with wrong information in it. When setting the culture manually didn't work, I started investigating.
The use case is a date picker. If this isn't solved I will either have to fall back to a JavaScript implementation, or fork the component and hard code all values for the most important cultures myself.
Our market is Norway, and thus the user interface needs to properly support Norwegian.
Skaff deg Outlook for Android<https://aka.ms/ghei36>
…________________________________
From: Larry Ewing ***@***.***>
Sent: Wednesday, March 30, 2022 3:56:08 AM
To: dotnet/runtime ***@***.***>
Cc: Christian Ruud ***@***.***>; Author ***@***.***>
Subject: Re: [dotnet/runtime] Incorrect DateTimeFormat for nb-NO in Blazor WebAssembly (Issue #67115)
This is likely a result of the way we strip down the formatting data for size reasons. Can you explain your use case to help us prioritize changes?
—
Reply to this email directly, view it on GitHub<#67115 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AXR4SXM6X2YMNKTBRSMXVODVCOYDRANCNFSM5RSGF45Q>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Thank you for reporting it, we are aware of the problem. This is a duplicate of #53239. |
Description
Getting month and day names returns incorrect values.
Months come back as M01, M02, etc
Days come back as English day names
Reproduction Steps
Expected behavior
Should return the correct values
Actual behavior
Returns incorrect values
Regression?
No response
Known Workarounds
No response
Configuration
.net 6
Windows 10 (WebAssembly)
x64
Spesific to blazor WebAssembly
All browsers
Other information
No response
The text was updated successfully, but these errors were encountered: