JDK-6804652 : Add getCalendarInstance to Locale Sensitive Services (SPI)
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 6u10
  • Priority: P5
  • Status: Closed
  • Resolution: Won't Fix
  • OS: linux
  • CPU: x86
  • Submitted: 2009-02-12
  • Updated: 2011-06-23
  • Resolved: 2011-06-23
Related Reports
Relates :  
Relates :  
Description
A DESCRIPTION OF THE REQUEST :
As it exists a Calendar.getInstance(Locale) method that depends of the Locale there should be a getCalendarInstance() to return the appropriate calendar for the custom locale.

JUSTIFICATION :
There are JSF Calendar Components that Render HTML Calendars from the locale, there is no way to pass a Calendar as a parameter.

Comments
EVALUATION We will not be providing an SPI that returns the instance of Calendar class, but instead provide an SPI for specifying locale dependent calendar data, i.e., firstDayOfWeek and minimalDaysInFirstWeek.
23-06-2011

EVALUATION One possible solution would be to introduce some properties file for GregorianCalendar, which would provide locale sensitive data needed for instantiating a GregorianCalendar, such as firstDayOfWeek.
13-02-2009

EVALUATION The Calendar API has many problems and we didn't want to propagate it to the SPI level. We'd like to get more feedback from developers.
13-02-2009