This proposal was approved by ICU PMC on 2012-02-15 with following
comments -
Markus (on vacation this week) may want to review the APIs. If he has any
questions in these APIs, we may re-discuss about it or degrade @draft to
@internal/tech preview before ICU 49 release.
-Yoshito
yoshito_umaoka@... wrote on 02/13/2012 05:13:13 AM:
> From: yoshito_umaoka@...
> To: icu-design@...,
> Date: 02/13/2012 05:14 AM
> Subject: [icu-design] ICU4C API proposal: TimeZoneNames and
TimeZoneFormat
>
> I would like to propose the following API for: ICU 49
> Please provide feedback by: next Wednesday, 2012-02-15
> Designated API reviewer: John Emmons, Claire Ho
> Ticket 1: http://bugs.icu-project.org/trac/ticket/8513 Expose
> TimeZoneNames/TimeZoneFormat as public API in ICU4C
> Ticket 2: http://bugs.icu-project.org/trac/ticket/8771 Lenient date/
> time parsing should handle different time zone styles
>
> TimeZoneNames and TimeZoneFormat were added into ICU4J as draft API
> in ICU4J 49M1 [http://bugs.icu-project.org/trac/ticket/8512]. This
> is a proposal for ICU4C C++ APIs matching the ICU4J TimeZoneNames/
> TimeZoneFormat.
>
> The initial work was done in ICU4C 4.8. At that time, the
> implementation was not exposed as public APIs. In the current trunk,
> most of features provided by ICU4J TimeZoneNames/TimeZoneFormat are
> implemented, but APIs are internal and not cleaned up for formal
> APIs. I'm proposing to formalize them currently defined in internal
> header, with some clean up/enhancement. The proposed APIs are
> parallel to the ICU4J TimeZoneNames/TimeZoneFormat with minor
differences.
>
> To quote entire proposal in this message seems too much, so I
> generated Doxygen API docs for them.
>
> TimeZoneNames - http://source.icu-project.org/~yoshito/8513/html/
> classTimeZoneNames.html
> TimeZoneFormat - http://source.icu-project.org/~yoshito/8513/html/
> classTimeZoneFormat.html
> SimpleDateFormat - http://source.icu-project.org/~yoshito/8513/html/
> classSimpleDateFormat.html (only for set/getTimeZoneFormat)
>
>
> Differences from ICU4J
>
> - ICU4J TimeZoneFormat.ParseOption (see my another proposal sent
> today) is mapped to UTimeZoneFormatParseOption [http://source.icu-
>
project.org/~yoshito/8513/html/tzfmt_8h.html#a44bcd9b133233e9c54b420fa4da7371b
> ]. ICU4C APIs taking/returning options use bitwise flags of
> UTimeZoneFormatParseOption enum, instead of EnumSet<ParseOption> in
ICU4J.
>
> - TimeZoneNames.find in ICU4J returns Collection<MatchInfo> [http://
>
icu-project.org/apiref/icu4j49m2/com/ibm/icu/text/TimeZoneNames.MatchInfo.html
> ]. But ICU4C does not have public collection class (UVector is
> internal), I propose a class representing the collection itself -
> TimeZoneNames::MatchInfoCollection [http://source.icu-project.org/
> ~yoshito/8513/html/classTimeZoneNames_1_1MatchInfoCollection.html]
>
> - Otherwise, differences are only linguistic representations.
>
> Thanks,
> Yoshito
|