Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support more granular format lengths in locale #3272

Open
atjn opened this issue Mar 17, 2024 · 1 comment
Open

Support more granular format lengths in locale #3272

atjn opened this issue Mar 17, 2024 · 1 comment

Comments

@atjn
Copy link
Contributor

atjn commented Mar 17, 2024

In #3268 I suggest using the CLDR data to autogenerate locale information. But the current locale data only provides a short and long option. The CLDR data supports four lengths: short, medium, long and full. You can see an example here: https://www.npmjs.com/package/cldr#cldrextractdateformatslocaleidroot-calendaridgregorian

The current locale formats roughly correspond to the short and medium formats in CLDR. I suggest adding the long and full formats as well. Given that banglejs is first and foremost a watch, it makes sense to me that there is extensive support for datetime formats. I can also see that some of the locales use longer formats in the long version. I have mentioned in #3268 that we probably need to make those shorter to ensure compat with apps, but we could still allow apps to explicitly opt in to a longer format by supporting all four CLDR formats.

Because the data is autogenerated from CLDR data, this change can be applied by me for all locales.

@gfwilliams
Copy link
Member

I'm not too sure on this... I feel like this is a feature nobody has actually asked for or needed to date?

It's also going to be tricky to do in a backwards compatible way as there's a default Locale built into the Bangle.js firmware

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants