Proposal: enum UDateFormatField (udat) #3391 - correction

Alan S Liu <[email protected]> Tue, 9 Mar 2004 16:18:37 -0800
Newsgroups gmane.comp.lib.icu.general
Message-ID <OFB065398B.61298DCF-ON88256E53.0001585F-88256E53.0001BA43@us.ibm.com>
Correction: UDateFormatField, not EDateFormatFields.

[Alan S Liu/San Jose/IBM@IBMUS; [email protected];; IBM Globalization; 
5600 Cottle Road; San Jose, CA 95193;; (408) 256-3155]

__________________

Background: In the past, ICU was entirely C++ source.  As we have added C 
cover API (udat, ucal, etc.) we have migrated some of the shared enums 
from C++ headers to C headers to make them available to both languages. 
We've already done this for Calendar, for instance.

Proposal: Migrate the DateFormat field constants (for use in 
FieldPosition) to the C udat header (for use in UFieldPosition and 
FieldPosition).

Currently there appear to be NO field constants declared for use by 
UFieldPosition, which limits its usefulness.

There is an existing C++ enum, DateFormat::EField.  This is marked @draft 
ICU 2.4.  Therefore we don't have to go through a deprecation cycle on 
this.  However, to be nice I'm thinking of marking this @obsolete 3.4, so 
we don't have to maintain two enums and keep them in sync.  Alternatively, 
I can mark it @deprecated and just freeze it -- it won't get the new field 
definitions.  Opinions?

Consequences: Minimal.  Since FieldPosition and UFieldPosition take an 
int32_t, not an enum type, we don't have to deprecate existing API and 
introduce new API.

Applies to ICU 3.0, ICU4C only.

http://www.jtcsv.com/cgibin/icu-bugs?findid=3391

[Alan S Liu/San Jose/IBM@IBMUS; [email protected];; IBM Globalization; 
5600 Cottle Road; San Jose, CA 95193;; (408) 256-3155]