return shiftedLabels;
}
protected Map<String, Object> getLocaleOptions(FacesContext facesContext, UIComponent component) {
AbstractCalendar calendarComponent = (AbstractCalendar) component;
Map<String, Object> map = new HashMap<String, Object>();
Locale locale = CalendarHelper.getAsLocale(facesContext, calendarComponent);
DateFormatSymbols dateFormat = new DateFormatSymbols(locale);
Calendar calendar = CalendarHelper.getCalendar(facesContext, calendarComponent);
int maximum = calendar.getActualMaximum(Calendar.DAY_OF_WEEK);
int minimum = calendar.getActualMinimum(Calendar.DAY_OF_WEEK);
int monthMax = calendar.getActualMaximum(Calendar.MONTH);
int monthMin = calendar.getActualMinimum(Calendar.MONTH);
String[] weekDayLabels = RenderKitUtils.asArray(calendarComponent.getWeekDayLabels());
if (isEmptyArray(weekDayLabels)) {
weekDayLabels = dateFormat.getWeekdays();
weekDayLabels = shiftDates(minimum, maximum, weekDayLabels);
}
RenderKitUtils.addToScriptHash(map, WEEK_DAY_LABELS, weekDayLabels);
String[] weekDayLabelsShort = RenderKitUtils.asArray(calendarComponent.getWeekDayLabelsShort());
if (isEmptyArray(weekDayLabelsShort)) {
weekDayLabelsShort = dateFormat.getShortWeekdays();
weekDayLabelsShort = shiftDates(minimum, maximum, weekDayLabelsShort);
}
RenderKitUtils.addToScriptHash(map, WEEK_DAY_LABELS_SHORT, weekDayLabelsShort);
String[] monthLabels = RenderKitUtils.asArray(calendarComponent.getMonthLabels());
if (isEmptyArray(monthLabels)) {
monthLabels = dateFormat.getMonths();
monthLabels = shiftDates(monthMin, monthMax, monthLabels);
}
RenderKitUtils.addToScriptHash(map, MONTH_LABELS, monthLabels);
String[] monthLabelsShort = RenderKitUtils.asArray(calendarComponent.getMonthLabelsShort());
if (isEmptyArray(monthLabelsShort)) {
monthLabelsShort = dateFormat.getShortMonths();
monthLabelsShort = shiftDates(monthMin, monthMax, monthLabelsShort);
}
RenderKitUtils.addToScriptHash(map, MONTH_LABELS_SHORT, monthLabelsShort);
int minDaysInFirstWeek = calendarComponent.getMinDaysInFirstWeek();
if (1 > minDaysInFirstWeek || minDaysInFirstWeek > 7) {
minDaysInFirstWeek = calendar.getMinimalDaysInFirstWeek();
}
if (0 <= minDaysInFirstWeek && minDaysInFirstWeek <= 7) {
RenderKitUtils.addToScriptHash(map, MIN_DAYS_IN_FIRST_WEEK, minDaysInFirstWeek);
}
int day = calendarComponent.getFirstWeekDay();
if (day < 0 || 6 < day) {
day = calendar.getFirstDayOfWeek() - calendar.getActualMinimum(Calendar.DAY_OF_WEEK);
}
if (0 <= day && day <= 6) {