Inconsistent UWP DateTimeFormatter output for similar patterns with en-US culture
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- csharp
- Domain
- internationalization
Research direction
Start with the DateTimeFormatter reproduction in the issue using the two en-US patterns and compare their outputs. The payload names no repository file or test; done would require determining whether the inconsistent ordering is an actionable sample issue or platform behavior and documenting the result.
Written by the indexing model from the issue text.
Description
I'm using Windows.Globalization.DateTimeFormatting.DateTimeFormatter in a UWP app with the culture set to "en-US". I noticed inconsistent formatting between two similar patterns.
Scenario:
Pattern: "day month.abbreviated year hour minute"
→ Output: 03-Jun-25 10:53 AM
Pattern: "day month.abbreviated hour minute"
→ Output: Jun 3 10:53 AM
Despite both using "day" and "month.abbreviated", the order of components differs depending on whether year is included or not.
Expectation:
Both formats should follow a consistent order like MM/dd/yyyy for a given culture ("en-US" in this case).
Ways to Reproduce:
string format1 = "day month.abbreviated year hour minute";
string format2 = "day month.abbreviated hour minute"
DateTimeFormatter formatter1 = new DateTimeFormatter(format1 , new[] { "en-US" });
DateTimeFormatter formatter2 = new DateTimeFormatter(format2 , new[] { "en-US" });
var output1 = formatter1.Format(DateTime.Now);
var output2 = formatter2.Format(DateTime.Now);
- Dominant language
- JavaScript
- Stars
- 9.7k
- Forks
- 7.8k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/Windows-universal-samples
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 52/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
microsoft/Windows-universal-samples#1442 · 6 comments ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 42/100
microsoft/Windows-universal-samples#1440 · 3 comments · 1 reaction ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
microsoft/Windows-universal-samples#1437 · 3 comments ·
All issues in microsoft/Windows-universal-samples
Similar issues
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
status: needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100