I am new to the mailing list, and am interested in contributing to the swift project.
I’ve been having a play with the ICU library’s unit formatting functions, and have created a simple wrapper that could be used by the various measurement formatters as well as the date component formatter. At the moment, this wrapper is written in swift, but I’m thinking it might make more sense to implement it as a core foundation layer, so as not to expose ICU directly to swift.
The interface for this could look something like:
CFUnitFormatterRef CFUnitFormatterCreate(CFAllocatorRef allocator, CFLocaleRef locale, CFUnitFormatterStyle style, CFNumberFormatterRef numberFormatter);
CFStringRef CFUnitFormatterCreateString(CFAllocatorRef allocator, CFUnitFormatterRef formatter, double value, CFUnitFormatterUnit unit);
CFStringRef CFUnitFormatterCreateStringWithMeasure(CFAllocatorRef allocator, CFUnitFormatterRef formatter, CFUnitFormatterMeasure measure);
CFStringRef CFUnitFormatterCreateStringWithMeasures(CFAllocatorRef allocator, CFUnitFormatterRef formatter, CFArrayRef measures);
Looking for any thoughts and suggestions before I begin implementing this.