/**
* Load the Date string array
*/
private synchronized void loadDates() {
CalendarData calData = new CalendarData(fLocale, calendar.getType());
UResourceBundle rb = calData.get("fields", "day", "relative");
Set<URelativeString> datesSet = new TreeSet<URelativeString>(new Comparator<URelativeString>() {
public int compare(URelativeString r1, URelativeString r2) {
if(r1.offset == r2.offset) {
return 0;
} else if(r1.offset < r2.offset) {
return -1;
} else {
return 1;
}
}
}) ;
for(UResourceBundleIterator i = rb.getIterator();i.hasNext();) {
UResourceBundle line = i.next();
String k = line.getKey();
String v = line.getString();
URelativeString rs = new URelativeString(k,v);
datesSet.add(rs);
}
fDates = datesSet.toArray(new URelativeString[0]);
}