Unable to parse input date containing abbreviated asian components using DateTimeFormatter

July 05, 2022, at 01:10 AM

I'm trying to parse a date string to LocalDate or LocalDateTime (actually any Temporal object), which contains asian abbreviated parts. When I provide a valid abbreviated chinese component(in example below - dayOfMonth), I get DateTimeParseException. Note that for the same scenario for other languages, this works just fine.


LocalDate.parse("2022年2月12日 週六", DateTimeFormatter.ofPattern("y年M月d日 EE", Locale.TRADITIONAL_CHINESE)) returns error Text '2022年2月12日 週六' could not be parsed at index 10.

However, if we use the non-abbreviated version (2022年2月12日 星期六), everything works fine.

If we take similar input in Spanish for example: LocalDate.parse("sáb. 12 feb. 2022", DateTimeFormatter.ofPattern("EE. dd MMM. y", Locale.forLanguageTag("es-ES"))), it will parse as expected.

Notes: I'm taking the abbreviated components from the standard CLDR data.

Is it at all possible to parse this input using any standard library?

Rent Charter Buses Company
Optimize multiple nested for loops? [closed]

Optimize multiple nested for loops? [closed]

Want to improve this question? Add details and clarify the problem by editing this post

Priority Queue - Order Messed Up

Priority Queue - Order Messed Up

I'm having a weird issue where my priority queue prints the last created item first, and then prints everything else in order

jMonkeyEngine dependencies with Gradle

jMonkeyEngine dependencies with Gradle

I am currently trying to implement a game written in java using jMonkey Graphic engineMy question is if it is possibile to load all the dependencies needed through Gradle, avoiding all *

package com.sun.beans.finder does not exist openjdk

package com.sun.beans.finder does not exist openjdk

When a file is compiled that imports comsun