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

Consider adding support for standalone day of week/month pattern symbols #242

Open
dlew opened this issue Feb 10, 2015 · 6 comments
Open
Labels

Comments

@dlew
Copy link

dlew commented Feb 10, 2015

In Android they added support for two non-standard symbols:

  • c - standalone day of week
  • L - standalone month

I was wondering if it's reasonable to add these to joda-time itself. I can work on a pull request, but I wanted to check before putting any time into it - would it be alright to add, or should we avoid these specializations?

(This was inspired by dlew/joda-time-android#30)

@jodastephen
Copy link
Member

There is no problem with adding additional pattern letters to Joda-Time via a PR. However, the bigger question is what data to output? The data for standalone is not available in earlier JDK versions.

@dlew
Copy link
Author

dlew commented Feb 10, 2015

Based on Android's SimpleDateFormat examples, it seems like they are identical to the non-standalone versions. Though maybe that's in English only?

@jodastephen
Copy link
Member

Different languages will have different data. Could default to a simple solution, but in Joda-Time it should really use reflection to access whatever data is available on Java 8.

@Pavel-Nosov
Copy link

Hello! In continuation of the topic, take a look at the fixed bug in JDK. They have introduced standalone style for month names 'L' and made 'M' pattern context dependent. So, now it's possible again in JDK to get month name in subjective case. Unfortunately, I didn't find this ability in the latest version of joda (2.8.1), even on latest JDK 8 (1.8.0_51). Sadness :( So, I suppose jodastephen is right and joda should have different behaviour on JDK 8, at least. Or have compatible version.

@sasuw
Copy link

sasuw commented Sep 8, 2020

This issue makes it impossible to display month names correctly in some languages (e.g. finnish, slovakian) when using joda-time with JDK 8 or newer.

@jodastephen
Copy link
Member

If you want to raise a PR, let me know so we could agree what is needed first.

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

No branches or pull requests

4 participants