erickguan / ffi-icu

FFI wrappers for ICU. MRI extension with the dynamic C library.
https://github.com/erickguan/ffi-icu
MIT License
35 stars 22 forks source link

Add #as_skeleton and #set_date_format_from_skeleton to DateTimeFormatter #51

Closed KJTsanaktsidis closed 2 years ago

KJTsanaktsidis commented 2 years ago

As documented in the tests, the main purpose of this functionality is to allow:

The use-case in question I have is being able to modify the standard skeleton patterns to use j for locale-appropriate 12/24 hour time, instead of H/h being specified per-locale. This means that locales with hours keywords like "en_AU@hours=h23" can be made to produce 24 hour time, which ICU would not normally do.

lwelti commented 2 years ago

I think is relevant to confirm your use case. Input: date, Locale, options Output?

KJTsanaktsidis commented 2 years ago

We discussed this today in our meeting - I don't think this is an especially good idea 😂