<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<div dir="auto">Given that "en_US" is well known and commonly a user input data, what is then the ideal way to create a Locale object for such string input?</div>
<div dir="auto"><br>
</div>
<div dir="auto">And isn't this the case of a breaking change more than just updating the time database used by default in JDK?</div>
<div dir="auto"><br>
</div>
<div dir="auto">Perhaps in other words, shouldn't Locale(String) constructor attempt to parse the input for the Locale(String, String) constructor so the behavior would have been maintained in accordance to Java 8?</div>
<div><br>
</div>
<div id="ms-outlook-mobile-signature" dir="auto">
<div dir="auto">Sent from mobile device.</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Naoto Sato <naoto.sato@oracle.com><br>
<b>Sent:</b> Monday, July 10, 2023 12:36:10 PM<br>
<b>To:</b> Bruno Borges <Bruno.Borges@microsoft.com>; core-libs-dev@openjdk.org <core-libs-dev@openjdk.org><br>
<b>Subject:</b> [EXTERNAL] Re: 4-letter patterns in Date Format Style no longer give full text style</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Hi,<br>
<br>
In your test case,<br>
<br>
```<br>
new Locale("en_US");<br>
```<br>
<br>
This will fall back to ROOT locale texts with CLDR (default since JDK9) <br>
where it differs from US English. Probably you may want to `new <br>
Locale("en", "US)` or preferably use `Locale.US` constant.<br>
<br>
Naoto<br>
<br>
On 7/10/23 12:08 PM, Bruno Borges wrote:<br>
> Hi all,<br>
> <br>
> Was there any change to Date Time Formatter API that made the "EEEE" and <br>
> the "MMMM" (and other 4-letter patterns) change from Java 8 to 11+ ?<br>
> <br>
> In Java 8, "EEEE" with locale en_US correctly gives the FULL day of <br>
> week, e.g., "Monday".<br>
> <br>
> In Java 11 and 17 (two I've tested), the same input will give "Mon".<br>
> <br>
> I've also tested for "MMMM" expecting "July" (as in 8), but in 11/17 I <br>
> get only "Jul".<br>
> <br>
> Here's a test case:<br>
> <br>
> brunoborges/date-formatting-bug@f8f84a1 (github.com) <br>
> <<a href="https://github.com/brunoborges/date-formatting-bug/actions/runs/5511890139/jobs/10048031299">https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fbrunoborges%2Fdate-formatting-bug%2Factions%2Fruns%2F5511890139%2Fjobs%2F10048031299&data=05%7C01%7CBruno.Borges%40microsoft.com%7C742add55ab3045a3ba2f08db817ced57%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638246145792123639%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Pgkr6uURQFaOjO3GL2stbpWprIgKFJTHBkBvu5ZZFNY%3D&reserved=0</a>><br>
> <br>
> <br>
> Thanks,<br>
> Bruno<br>
</div>
</span></font></div>
</body>
</html>