From: Peter Edberg Date: Wed, 17 Feb 2016 05:50:57 +0000 (+0000) Subject: ICU-12072 Update C comments explaining future direction X-Git-Tag: milestone-59-0-1~668 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=257b757897a70cb8ce359e4f69aea0495b3d10e0;p=icu ICU-12072 Update C comments explaining future direction X-SVN-Rev: 38319 --- diff --git a/icu4c/source/i18n/reldatefmt.cpp b/icu4c/source/i18n/reldatefmt.cpp index ed3d467efdc..ce820338476 100644 --- a/icu4c/source/i18n/reldatefmt.cpp +++ b/icu4c/source/i18n/reldatefmt.cpp @@ -814,10 +814,14 @@ UnicodeString& RelativeDateTimeFormatter::formatNumeric( if (U_FAILURE(status)) { return appendTo; } - // For a quick bringup just call the above method; this leaves some - // holes (e.g. for handling quarter). Need to redo the data structure - // to support all necessary data items, and to be indexed by the - // newer enum. + // TODO: + // The full implementation of this depends on CLDR data that is not yet available, + // see: http://unicode.org/cldr/trac/ticket/9165 Add more relative field data. + // In the meantime do a quick bring-up by calling the old format method; this + // leaves some holes (even for data that is currently available, such as quarter). + // When the new CLDR data is available, update the data storage accordingly, + // rewrite this to use it directly, and rewrite the old format method to call this + // new one; that is covered by http://bugs.icu-project.org/trac/ticket/12171. UDateRelativeUnit relunit = UDAT_RELATIVE_UNIT_COUNT; switch (unit) { case UDAT_REL_UNIT_YEAR: relunit = UDAT_RELATIVE_YEARS; break; @@ -863,10 +867,14 @@ UnicodeString& RelativeDateTimeFormatter::format( if (U_FAILURE(status)) { return appendTo; } - // For a quick bringup just use the existing data structure; this leaves - // some holes (e.g. for handling quarter). Need to redo the data structure - // to support all necessary data items, and to be indexed by the - // newer enum. + // TODO: + // The full implementation of this depends on CLDR data that is not yet available, + // see: http://unicode.org/cldr/trac/ticket/9165 Add more relative field data. + // In the meantime do a quick bring-up by calling the old format method; this + // leaves some holes (even for data that is currently available, such as quarter). + // When the new CLDR data is available, update the data storage accordingly, + // rewrite this to use it directly, and rewrite the old format method to call this + // new one; that is covered by http://bugs.icu-project.org/trac/ticket/12171. UDateDirection direction = UDAT_DIRECTION_COUNT; int32_t intoffset = (offset < 0)? (int32_t)(offset-0.5) : (int32_t)(offset+0.5); switch (intoffset) {