From 7917df1e8021023d8d93d811e26becb5e2b8be64 Mon Sep 17 00:00:00 2001 From: Shane Carr Date: Sat, 16 Nov 2019 00:15:37 -0800 Subject: [PATCH] ICU-20883 Move UFormattedDateInterval to end of argument list. --- icu4c/source/i18n/udateintervalformat.cpp | 2 +- icu4c/source/i18n/unicode/udateintervalformat.h | 10 +++++----- icu4c/source/test/cintltst/cdateintervalformattest.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/icu4c/source/i18n/udateintervalformat.cpp b/icu4c/source/i18n/udateintervalformat.cpp index e16df08fabf..388960384b5 100644 --- a/icu4c/source/i18n/udateintervalformat.cpp +++ b/icu4c/source/i18n/udateintervalformat.cpp @@ -119,9 +119,9 @@ udtitvfmt_format(const UDateIntervalFormat* formatter, U_DRAFT void U_EXPORT2 udtitvfmt_formatToResult( const UDateIntervalFormat* formatter, - UFormattedDateInterval* result, UDate fromDate, UDate toDate, + UFormattedDateInterval* result, UErrorCode* status) { if (U_FAILURE(*status)) { return; diff --git a/icu4c/source/i18n/unicode/udateintervalformat.h b/icu4c/source/i18n/unicode/udateintervalformat.h index 9777c4b6680..d8b52b757ed 100644 --- a/icu4c/source/i18n/unicode/udateintervalformat.h +++ b/icu4c/source/i18n/unicode/udateintervalformat.h @@ -261,23 +261,23 @@ udtitvfmt_format(const UDateIntervalFormat* formatter, * UDateIntervalFormat object. * @param formatter * The UDateIntervalFormat object specifying the format conventions. - * @param result - * The UFormattedDateInterval to contain the result of the - * formatting operation. * @param fromDate * The starting point of the range. * @param toDate * The ending point of the range. + * @param result + * The UFormattedDateInterval to contain the result of the + * formatting operation. * @param status * A pointer to a UErrorCode to receive any errors. - * @draft ICU 64 + * @draft ICU 67 */ U_DRAFT void U_EXPORT2 udtitvfmt_formatToResult( const UDateIntervalFormat* formatter, - UFormattedDateInterval* result, UDate fromDate, UDate toDate, + UFormattedDateInterval* result, UErrorCode* status); /** diff --git a/icu4c/source/test/cintltst/cdateintervalformattest.c b/icu4c/source/test/cintltst/cdateintervalformattest.c index 6635de2523e..fb5bc73be28 100644 --- a/icu4c/source/test/cintltst/cdateintervalformattest.c +++ b/icu4c/source/test/cintltst/cdateintervalformattest.c @@ -332,7 +332,7 @@ static void TestFormatToResult() { { const char* message = "Field position test 1"; const UChar* expectedString = u"27. September 2010, 15:00 – 2. März 2011, 18:30"; - udtitvfmt_formatToResult(fmt, fdi, Date201009270800, Date201103021030, &ec); + udtitvfmt_formatToResult(fmt, Date201009270800, Date201103021030, fdi, &ec); assertSuccess("Formatting", &ec); static const UFieldPositionWithCategory expectedFieldPositions[] = { // category, field, begin index, end index @@ -358,7 +358,7 @@ static void TestFormatToResult() { { const char* message = "Field position test 2"; const UChar* expectedString = u"27. September 2010, 15:00–22:00 Uhr"; - udtitvfmt_formatToResult(fmt, fdi, Date201009270800, Date201009270800 + 7*_HOUR, &ec); + udtitvfmt_formatToResult(fmt, Date201009270800, Date201009270800 + 7*_HOUR, fdi, &ec); assertSuccess("Formatting", &ec); static const UFieldPositionWithCategory expectedFieldPositions[] = { // category, field, begin index, end index