We're updating the issue view to help you get more done. 

weekOfPreference

Description

I suggest we add API to get at the weekOfPreference (we had call for that internally).

Something simple like:

1 2 3 4 5 6 7 8 public enum WeekOfPreference { weekOfDate, weekOfInterval, weekOfMonth, weekOfYear } public static List<WeekOfPreference> getWeekPreference(ULocale loc)

BTW, I was experimenting with adding a helper class that would make it simpler to add new APIs to access data we have in resource bundles. For example, the above can be supported with:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 public static List<WeekOfPreference> getWeekPreference(ULocale loc) { return ResourceBundles.getWithFallback(data, loc.toString()); } static Transform<String, WeekOfPreference> TRANS_WEEK = new Transform<String, WeekOfPreference>(){ @Override public WeekOfPreference transform(String source) { return WeekOfPreference.valueOf(source); } }; private static final Map<String, List<WeekOfPreference>> data = ResourceBundles.get( new Transform[]{null, null, TRANS_WEEK}, ICUData.ICU_BASE_NAME, "supplementalData", "weekOfPreference");

!// the last call loads up an immutable Map from the appropriate resource bundle, fleshing out single items into lists where necessary (since they are collapsed in the RB), and converting the types where necessary. The TRANS_WEEK could be inlined; I just separated it for clarity.

Status

Assignee

Mark Davis

Reporter

Mark Davis

Reviewer

None

Time Needed

None

Start date

None

Components

Fix versions

Priority

assess