Commit graph

5905 commits

Author SHA1 Message Date
younies
b594f4b2a9 ICU-21349 Enhance Supporting Mixed Unit (such as "inch-and-foot")
See #1363
2021-01-20 17:50:36 +01:00
Younies Mahmoud
0895a223a3 ICU-21349 Adjust C++ MeasureUnitImpl::serialize to be as same as the Java one
See #1496
2021-01-13 22:31:05 +01:00
yumaoka
25eb1510ec ICU-21448 Update ICU tzdata to 2020f 2021-01-06 21:44:07 -05:00
Erik Torres Aguilar
bd3b202741 ICU-21018 Fix typos across repo that start with letter A
See #1506
2021-01-06 15:15:35 -08:00
Erik Torres Aguilar
6eea259143 ICU-21018 Fix typos across repo that start with letter C
See #1525
2021-01-06 15:15:26 -08:00
inokawa
bb5d29b143 ICU-21416 Fix typos in comments 2020-12-09 14:17:14 -08:00
Jeff Genovy
8f787b6de9 ICU-21388 Remove test case that does nothing so that we can mark RuleBasedCollator as final. 2020-12-04 15:47:40 -08:00
younies
c07264a363 ICU-21349 Make appendSingleUnit behaviour in C++ comply with Java
See #1486
2020-12-01 01:42:17 +04:00
Hugo van der Merwe
3d706fac42 ICU-21349 fix comment for CLDR identifiers
See #1481
2020-11-25 19:36:08 +04:00
Hugo van der Merwe
35e950d35f ICU-21387 measunit: check for nullptr before calling delete 2020-11-25 00:19:07 +01:00
Frank Tang
275d59aa2a ICU-21410 fix int32_t overflow in listFormat
See #1479
2020-11-23 17:12:30 -08:00
Hugo van der Merwe
f7ab1f7c50 ICU-21349 Fix confusing names of exponent variables.
See #1464
2020-11-17 23:54:25 +01:00
Hugo van der Merwe
50bd7969c7 ICU-21349 Remove a potential 0/0 (=NaN). Align C++ & Java better. 2020-11-17 20:21:39 +01:00
Shane F. Carr
a593239dba
ICU-21389 Merge maint/maint-68 to master 2020-11-16 18:50:26 -06:00
younies
909f343cd6 ICU-21349 Improve MeasureUnit comparators
See #1433
2020-11-13 23:36:00 +04:00
Shane F. Carr
e7f66732f8 ICU-21383 Fix memory problem in FormattedStringBuilder 2020-11-11 09:40:12 -06:00
Hugo van der Merwe
710fa5aaf9 ICU-20941 Support formatting joule-per-furlong (builtin-per-builtin).
See #1409
2020-11-04 18:07:09 +01:00
Shane F. Carr
86f00ad7fb ICU-21340 Don't coalesce adjacent list formatter fields in ICU4C
See #1425
2020-10-23 20:37:07 -05:00
Rich Gillam
87643423be ICU-21343 Added code to keep us from messing up quoted literal pattern text when performing find-and-replace
operations on it.
2020-10-23 10:05:01 -07:00
Rich Gillam
d1581238f4 ICU-21342 Made sure adjustFieldWidth() got called on the duplicated hour pattern used for UCAL_AM_PM in 24-hour patterns. 2020-10-22 21:25:55 -07:00
Shane F. Carr
340271c225 ICU-21334 Promote ICU4C ListFormatter openForType to stable.
Also fixes ICU-20957 and ICU-21286.
2020-10-22 01:48:50 -05:00
Hugo van der Merwe
eb3bb792cd ICU-21339 toSkeleton: treat percent and permille correctly
See #1414
2020-10-21 19:37:14 +02:00
Hugo van der Merwe
0439cc5f7b ICU-21311 Fix code generation in MeasureUnitTest.java and use it 2020-10-20 23:52:14 +02:00
Hugo van der Merwe
1b11fae07b ICU-21337 Remove U_I18N_API from enum. 2020-10-20 19:21:27 +02:00
Hugo van der Merwe
57820a495d ICU-21337 Remove U_I18N_API from enum. 2020-10-20 03:26:44 +02:00
Frank Tang
f1a8a63f06 ICU-21316 Fix bug under different default locales
See #1399
2020-10-07 21:05:29 -07:00
Richard Gillam
5de5cabfb0 ICU-21249 Add new U_HIDE_INTERNAL_API guards 2020-10-06 10:09:18 -07:00
Elango Cheran
6700602974 ICU-21270 Support exponent in FixedDecimal and samples in C++ 2020-10-02 09:21:29 -07:00
Hugo van der Merwe
a84fdd0e90 ICU-21266 Support toSkeleton() for all functional Unit Formatters
See #1347
2020-10-01 02:51:27 +02:00
Hugo van der Merwe
a08ac00c67 ICU-21304 Update old userguide links to unicode-org.github.io 2020-10-01 01:28:05 +02:00
Hugo van der Merwe
9cb611d09f ICU-20568 Improve negative measure handling for mixed units
See #1379
2020-10-01 00:12:09 +02:00
Ikko Ashimine
ecf5fab30b ICU-21293 Fix typo in rematch.cpp comment
arguements→arguments
2020-09-29 15:02:27 -07:00
Rich Gillam
1ff371c225 ICU-21249 ICU4C API promotions 2020-09-28 17:19:04 -07:00
Hugo van der Merwe
81d43a2092 ICU-20568 Fix "1 foot 12 inches" behaviour
See #1337
2020-09-23 08:10:22 +02:00
Peter Edberg
3d8ae5eb6d ICU-20590 Ensure time format consistency for SHORT vs j patterns if no locale data 2020-09-22 22:50:36 -07:00
Shane F. Carr
6b3a7a64ab ICU-21190 Adding PluralRules select for number ranges
See #1309
2020-09-22 15:49:30 -05:00
Markus Scherer
8dc85529e1 ICU-21249 add hide-draft guards for some @draft ICU 68 API 2020-09-20 21:04:41 -05:00
Hugo van der Merwe
e3bb5e5f07 ICU-20568 Add .unit().usage() support to ICU4J NumberFormatter (2/2)
* Throw UnsupportedOperationException for "unsanctioned units"
* Deal with the parent issue for LongNameMultiplexer
* Fix NullPointerException: UnitConversionHandler.processQuantity must
  call fParent.processQuantity
* toSkeleton not supported for not-built-in units
* Add and use interface
  LongNameMultiplexer.ParentlessMicroPropsGenerator
* Match up C++ and Java unit tests in NumberFormatterApiTest.java
* Permit user-override of precision() for usage(), closes icu-units#95
* Use BogusRounder to propagate mathContext.
* Port C++ change from PR #1322, commit c84ded050a, to Java.
* Test the usage-without-unit error. Document it in
  NumberFormatterSettings.java
* General review and corrections.
2020-09-19 01:31:08 +02:00
Hugo van der Merwe
c84ded050a ICU-20568 Have macrosToMicroGenerator do input unit calculation.
This moves input unit calculation out of UnitConversionHandler making
it simpler and clearer, and localises the "MacroProps interpretation"
work in macrosToMicroGenerator, where it belongs.
2020-09-17 12:11:26 +02:00
Hugo van der Merwe
5ed09dc9b8 ICU-20568 Improve MacroProps error handling.
In particular: actually handle Usage memory allocation errors.
Also: correct Scale's error condition.
2020-09-17 01:13:45 +02:00
gnrunge
3a55ce096a ICU-21249 Adds #if !UCONFIG_NO_FORMATTING around all code in number_symbolswrapper.cpp.
If UCONFIG_NO_FORMATTING is set to 1 in uconfig.h nothing in
number_symbolswrapper.cpp compiles. Note, for example, that the entirety
of the included numberformatter.h header file is inclosed in
!UCONFIG_NO_FORMATTING.

ICU-21249 Properly arrange #if !UCONFIG_NO_FORMATTING.
2020-09-16 09:19:03 -07:00
Hugo van der Merwe
4bcefe1c4b ICU-20568 Cleanup: drop declaration for no longer existing factory. 2020-09-16 12:40:20 +02:00
Shane F. Carr
5a35a31e9a ICU-21021 Changing MeasureUnit::splitToSingleUnits to return std::pair 2020-09-15 20:53:51 -05:00
Shane F. Carr
74b7882a86 ICU-21249 Remove obsolete TODO for ICU-13591 2020-09-15 12:27:44 -05:00
Shane F. Carr
6198151510 ICU-20775 Complete set of toDecimalNumber functions in ICU4C
See #1310
2020-09-14 21:02:59 -05:00
Hugo van der Merwe
a667b279d4 ICU-20568 Correct the numberformatter.h docs for usage() 2020-09-14 20:18:25 +02:00
Jeff Genovy
dd372dc104 ICU-21196 Clarify API docs that input strings must out-live the object in ucoleiter.h and usearch.h 2020-09-14 11:14:12 -07:00
Peter Edberg
74c66351d8 ICU-20651 add setContext/getContext for [U]DateIntervalFormat 2020-09-11 20:12:44 -07:00
Markus Scherer
a18df7ba28 ICU-21267 stop using FALSE & TRUE macros in most library-internal headers 2020-09-10 13:55:46 -07:00
Hugo van der Merwe
e3123c83a4 ICU-20568 Support smart units / unit contexts / preferences
Explore Usage-related error codes, address icu-units/icu#36.
PR: https://github.com/icu-units/icu/pull/56
Commit: d5d7fdccfe

Implement Precision handling in UsagePrefsHandler::processQuantity
PR: https://github.com/icu-units/icu/pull/61
Commit: 16547f3298

Support Mixed Units in NumberFormatter when using usage()
PR: https://github.com/icu-units/icu/pull/52
Commit: cc5a122021

For MixedUnits, use the correct ListFormatter styles.
PR: https://github.com/icu-units/icu/pull/66
Commit: 77bb747002

Read the CLDR testData test files from the new location.
PR: https://github.com/icu-units/icu/pull/68
Commit: 6eb992e2b3

Fix double-precision maths in unit conversions
PR: https://github.com/icu-units/icu/pull/71
Commit: 78e88fbddef0f6817654d58c9c5dfeb6606324b9

Support .unit(MIXED_UNIT) without .usage(...).
PR: https://github.com/icu-units/icu/pull/72
Commit: 56ac7959375b8c9363ff022185165e52490c6c00

More commits:
- Reorder numbertest_api.cpp tests for consistent order.
- NumberFormatterApiTest: fold unitPipeline() into unitCompoundMeasure()
- Add some 'template class' instantiations for MSVC.
- Make trimField handle all whitespace, improve test messages
- Drop templated 'appendAll': it requires copy constructor
- Add protected MaybeStackArray::copyFrom()
- Add TODO(icu-units#67) and commented-out test case: use kUndefinedField for now
- Provide correct output order for units like "inch-and-foot"
- MSVC: export MaybeStackVector<MeasureUnit>
- Code review feedback: dependencies.txt and doc comments
- Consistent naming for code files: units_*
2020-09-10 22:39:18 +02:00