Skip to content

Inconsistent UWP DateTimeFormatter output for similar patterns with en-US culture #1433

@hemapriya-gv-17087

Description

@hemapriya-gv-17087

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions