Add RelativeDateTimeFormatter.format(FieldPositionIterator)?

Description

DateFormat and NumberFormat support format methods which take a FieldPositionIterator as an argument. Would it be reasonable to add this for other formatters, such as RelativeDateTimeFormatter?

This would be useful for JavaScript implementations of RelativeTimeFormat [1] This allows, for example, to make some parts of the result bold. ECMA-402 is adding these "formatToParts" methods for all new formatters being bound to ICU, as part of a consistent surface for all formatters.

If I contributed a patch, does this seem like the kind of thing that could be an acceptable addition to the API?

[1] https://github.com/caridy/proposal-intl-relative-time , https://github.com/tc39/ecma402/issues/35

Status

Assignee

Shane Carr

Reporter

TracBot

Reviewer

Frank Yung-Fong Tang

Time Needed

Days

Start date

None

Components

Fix versions

Priority

major