A DESCRIPTION OF THE REQUEST :
Since Java 8, Hijri Calendar added to the core libraries by using HijrahChronology.
As per HijrahChronology's javadoc (java 9), each variant is configured by using a resource file called "hijrah-config-<calendar type>.properties". However, as per javadoc of java 9's HijrahChronology source code, the location of the variant configuration resource is:
"/java/time/chrono/hijrah-config-" + calendarType + ".properties"
Unfortunately, that prevents developers from configuring a new variant into Java.
JUSTIFICATION :
I work in one of the government sectors in Saudi Arabia, and we have a custom variant in our DB. We need a mechanism to inject our custom Hirah variant into HijrahChronology at runtime.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Provide a method in HijrahChronology that receives a custom variant data as a parameter.
ACTUAL -
There is no way to configure a custom variant into HijrahChronology.
CUSTOMER SUBMITTED WORKAROUND :
I think the only workaround is to use Reflection to access HijrahChronology's private instance fields and manipulate them.
Since Java 8, Hijri Calendar added to the core libraries by using HijrahChronology.
As per HijrahChronology's javadoc (java 9), each variant is configured by using a resource file called "hijrah-config-<calendar type>.properties". However, as per javadoc of java 9's HijrahChronology source code, the location of the variant configuration resource is:
"/java/time/chrono/hijrah-config-" + calendarType + ".properties"
Unfortunately, that prevents developers from configuring a new variant into Java.
JUSTIFICATION :
I work in one of the government sectors in Saudi Arabia, and we have a custom variant in our DB. We need a mechanism to inject our custom Hirah variant into HijrahChronology at runtime.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Provide a method in HijrahChronology that receives a custom variant data as a parameter.
ACTUAL -
There is no way to configure a custom variant into HijrahChronology.
CUSTOMER SUBMITTED WORKAROUND :
I think the only workaround is to use Reflection to access HijrahChronology's private instance fields and manipulate them.
- csr for
-
JDK-8236810 Add a mechanism to configure custom variants in HijrahChronology
-
- Closed
-