ucal_getTimeZoneDisplayName seems to spend a good chunk of time in creating a numbering system. It's not clear why that's needed
ucal_getGregorianChange just reads a constant. There's probably opportunities so we don't have to create a ucal object just for that
ucal_setAttribute, ucal_getAttribute, ucal_getLimit are just setting and reading a variable on the object. However the current implementation uses a String key, and switch through the cases:
ucal_setAttribute(ucalendar, UCAL_MINIMAL_DAYS_IN_FIRST_WEEK, Int32(newValue))
// which calls the following in ICU
switch (key) {
...
case UCAL_FIRST_DAY_OF_WEEK:
((Calendar*)cal)->setFirstDayOfWeek((UCalendarDaysOfWeek)newValue);
break;
}
It'd be nice if we could directly do what you can do with the C++ API.
ucal_getTimeZoneDisplayNameseems to spend a good chunk of time in creating a numbering system. It's not clear why that's neededucal_getGregorianChangejust reads a constant. There's probably opportunities so we don't have to create aucalobject just for thatucal_setAttribute,ucal_getAttribute,ucal_getLimitare just setting and reading a variable on the object. However the current implementation uses aStringkey, andswitchthrough the cases:It'd be nice if we could directly do what you can do with the C++ API.