From d1e742d5ad956b6282cf5abfb881b1b628ab7f88 Mon Sep 17 00:00:00 2001 From: sunyaozu Date: Thu, 6 Apr 2023 14:38:29 +0800 Subject: [PATCH] number format support number grouping Signed-off-by: sunyaozu --- frameworks/intl/src/number_format.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frameworks/intl/src/number_format.cpp b/frameworks/intl/src/number_format.cpp index ddede94b..349bb943 100644 --- a/frameworks/intl/src/number_format.cpp +++ b/frameworks/intl/src/number_format.cpp @@ -136,7 +136,7 @@ void NumberFormat::InitProperties() numberFormat = numberFormat.precision(icu::number::Precision::maxFraction(DEFAULT_FRACTION_DIGITS)); } if (!useGrouping.empty()) { - numberFormat.grouping((useGrouping == "true") ? + numberFormat = numberFormat.grouping((useGrouping == "true") ? UNumberGroupingStrategy::UNUM_GROUPING_AUTO : UNumberGroupingStrategy::UNUM_GROUPING_OFF); } if (!currencySign.empty() || !signDisplayString.empty()) {