Yoshito Umaoka
45cdda61a6
ICU-12973 CLDR Japanese Era data and tentative Japanese new era support ( #111 )
...
* Updated era data format in supplementalData.
* Include tentative era names in data. Implemented Japanese era loaded from CLDR data in ICU4J.
* ICU4C implementation, ICU4C refactoring. WIP.
* VS project updates and some bug fixes
Also added API comments.
* Review feedback and bug fixes
- NULL to nullptr
- use of LocalUResourceBundlePointer
- TYPO "name" to "named"
- env var checking stricmp() == 0
* API comment correction based on feedback
* Duplicate the comment in ucal.h to calendar.h
* Fixed spelling errors in API comment
2018-09-27 14:27:39 -07:00
Frank Tang
00ccb44a30
ICU-13754 Add a ListFormatter FieldPositionIterator format method ( #109 )
...
ICU-13754 Reapply PR#106 after sffc rewinding master it.
2018-09-27 14:27:39 -07:00
Frank Tang
0fa1b5c5eb
ICU-20022 support quarter in RelativeDateTimeFormatter ( #77 )
...
also add UDAT_ABSOLUTE_QUARTER to UDateAbsoluteUnit
2018-09-27 14:27:39 -07:00
Frank Tang
e6a5f0ee0a
ICU-13754 Move listformatter from common to i18n ( #96 )
2018-09-27 14:27:39 -07:00
Shane Carr
dbd9065c69
ICU-20110 Adding const to FormattedNumber#appendTo
2018-09-27 14:27:39 -07:00
Daniel Ju
b13c951348
ICU-20043 ICU-13214 ICU-13764 MSVC W3 and W4 warning cleanup ( #53 )
...
Cleaned up all of the MSVC W3 warnings and most of the W4 warnings in the common and i18n projects.
2018-09-27 14:27:38 -07:00
Steven R. Loomis
23389e756c
ICU-13685 c: add @preview (retry) ( #8 )
...
* ICU-13685 - add a @preview tag in Doxygen
* Change @internal to @preview for existing tech preview sites
ICU-13685
2018-09-27 14:27:37 -07:00
Jeff Genovy
02a2c9cce9
ICU-20036 CurrencyPluralInfo class improve handling of OOM errors ( #17 )
...
ICU-20036 CurrencyPluralInfo class doesn't always check/handle OOM errors.
Changes include:
- Using LocalPointer instead of raw new/delete, in order to make the code cleaner.
- Using nullptr instead of NULL.
- Inspired by Andy's review feedback PluralRules changes, this change sets fPluralRules and fLocale to nullptr in the assignment operator in order to prevent possible double deletes in the failure case.
- More consistent about not checking for nullptr when calling delete.
- Using LocalUResourceBundlePointer in order to simply the code and not need manual deletes.
- Reduce memory usage by using the same LocalUResourceBundle with .getAlias() instead of allocating new ones.
2018-09-27 14:27:37 -07:00
Jeff Genovy
3712aa3d6e
ICU-13810 Fix typo in datefmt.h macro. ( #36 )
2018-09-27 14:27:37 -07:00
Jeff Genovy
8edc6ba107
ICU-20042 Improve OOM handling in PluralRules class. ( #20 )
...
- PluralRules class doesn't handle out-of-memory (OOM) errors in some code paths.
- The clone and assignment operator (operator=) methods of construction don't take an error code parameter, meaning that if an OOM error occurs during the constructor, it will not reported back to the caller, and the caller has no way to know that the object is in a half-constructed state.
- Using an internal status variable for these above cases.
- Changes to the various PluralRules helper classes to check for OOM as well.
- Using nullptr instead NULL.
- Using LocalPointer instead of raw new/delete in some cases.
- Need to set mRules to nullptr, otherwise we can end up with double deletes in the failure case. (Thanks to Andy for the review).
- Using default member initializers for class members to avoid dangling pointers. Also allows for using default constructors too.
2018-09-27 14:27:37 -07:00
Andy Heninger
35ce5296c1
ICU-13810 Doxygen warning cleanup.
2018-09-27 14:27:37 -07:00
Jeff Genovy
b12a927c93
ICU-13778 DataTimePatternGenerator code refactor. Handle Out-of-Memory (OOM) errors, use LocalPointer to prevent memory leaks when OOM occurs, use an internal error code to better report errors during clone and copy construction, mark helper methods and parameters as const, use nullptr instead of NULL, minor spelling and formatting changes. (Note: All tests pass on Windows and Linux).
...
X-SVN-Rev: 41552
2018-06-27 19:25:52 +00:00
Shane Carr
08134fc59e
ICU-13667 Making =delete APIdocs consistent in numberformatter.h
...
X-SVN-Rev: 41495
2018-05-31 22:04:08 +00:00
Shane Carr
404a06a0f8
ICU-13667 Fixing incorrect version tag on scale() setter.
...
X-SVN-Rev: 41493
2018-05-31 21:32:35 +00:00
Shane Carr
6b7022632b
ICU-13667 Making new DecimalFormat constructor private.
...
X-SVN-Rev: 41489
2018-05-30 21:27:07 +00:00
Markus Scherer
438f1f363b
ICU-13667 LocalizedNumberFormatterAsFormat is in the old Format class hierarchy, add ClassID boilerplate; NoUnit move virtual destructor up into first-virtual position, right after constructors
...
X-SVN-Rev: 41487
2018-05-30 19:15:02 +00:00
Peter Edberg
16519f2643
ICU-13667 ICU 62rc BRS, update guard conditionals for non-stable API part 1 (i18n pass 1)
...
X-SVN-Rev: 41486
2018-05-30 18:39:29 +00:00
Norbert Runge
781154c113
ICU-13667 Moves digits_t, DEFAULT_THRESHOLD, and copyErrorTo() outside of U_HIDE_INTERNAL_API.
...
X-SVN-Rev: 41485
2018-05-30 14:40:13 +00:00
Peter Edberg
8d17fb0e1b
ICU-13667 ICU 62rc BRS, update measurement unit constants
...
X-SVN-Rev: 41481
2018-05-30 01:22:52 +00:00
Markus Scherer
d8f9a47637
ICU-13667 update/fix/improve dependencies; better layering formatting->numberparser->numberformatter->number_representation
...
X-SVN-Rev: 41461
2018-05-25 17:57:30 +00:00
Shane Carr
4beed11456
ICU-13722 Removing obsolete constructs FmtStackData and UCONFIG_FORMAT_FASTPATHS_49.
...
X-SVN-Rev: 41457
2018-05-25 00:26:00 +00:00
Shane Carr
79b8248092
ICU-13677 Fixing up apidoc strings for precision setting.
...
X-SVN-Rev: 41456
2018-05-24 21:28:11 +00:00
Shane Carr
2af33b7796
ICU-13763 Makes FieldPositionIterator offset by input string length in DecimalFormat, restoring ICU 61 behavior.
...
X-SVN-Rev: 41442
2018-05-23 21:08:53 +00:00
Shane Carr
4931366afe
ICU-13717 Adds "fast formatters" optimization to smpdtfmt.cpp to greatly improve the performance of SimpleDateFormat with the new number formatting pipeline.
...
X-SVN-Rev: 41438
2018-05-23 02:00:03 +00:00
Shane Carr
3e2bbc9834
ICU-13717 Fixes memory leak in date format parsing by moving cloning into the parseInt function.
...
X-SVN-Rev: 41437
2018-05-23 01:18:07 +00:00
Shane Carr
25d6d69068
ICU-13717 Moves NumberFormat cloning into the zeroPaddingNumber method. Also indirectly fixes a memory leak from the previous commit.
...
X-SVN-Rev: 41436
2018-05-23 01:04:17 +00:00
Shane Carr
eb1f330d3d
ICU-13717 Removing SimpleDateFormatMutableNFs. Temporary performance regression.
...
X-SVN-Rev: 41434
2018-05-22 22:42:13 +00:00
Shane Carr
c2412adb1e
ICU-11626 Fixes ICU4C CurrencyPluralInfo unit tests. Also fixes a memory leak in CurrencyPluralInfo implementation.
...
X-SVN-Rev: 41431
2018-05-22 20:47:19 +00:00
Shane Carr
0a2aeb017a
ICU-13333 Adding combining dot spoof check.
...
X-SVN-Rev: 41428
2018-05-22 02:47:31 +00:00
Yoshito Umaoka
c5437c6e00
ICU-13300 Added thread safety note to TimeZone::detectHostTimeZone().
...
X-SVN-Rev: 41421
2018-05-21 00:39:51 +00:00
Yoshito Umaoka
9cc7d14b62
ICU-13602 Check error status for lazily instantiated TiemZoneFormat in SimpleDateFormat.
...
X-SVN-Rev: 41413
2018-05-19 00:18:25 +00:00
Shane Carr
d7f3471733
ICU-13757 Renaming skeleton methods fromSkeleton -> forSkeleton
...
X-SVN-Rev: 41393
2018-05-17 00:43:12 +00:00
Shane Carr
b347a140ec
ICU-13742 Implementing number skeletons in MessageFormat.
...
X-SVN-Rev: 41377
2018-05-15 00:05:04 +00:00
Shane Carr
c3fa4e91b5
ICU-12931 Removing erroneous #ifdef U_HIDE_INTERNAL_API in numfmt.h
...
X-SVN-Rev: 41376
2018-05-14 23:38:13 +00:00
Shane Carr
3eb414943e
ICU-13662 Minor fixes after r41365.
...
X-SVN-Rev: 41366
2018-05-09 02:04:21 +00:00
Shane Carr
fb94a3eb76
ICU-13662 Replying to code review feedback.
...
X-SVN-Rev: 41365
2018-05-09 02:00:22 +00:00
Shane Carr
3afec22e3a
ICU-13677 Fixing typo in numberformatter.h documentation.
...
X-SVN-Rev: 41360
2018-05-08 21:48:18 +00:00
Shane Carr
e27cf9ce39
ICU-13677 Changing NumberFormatter rounding setting to precision and roundingMode.
...
X-SVN-Rev: 41330
2018-05-05 06:32:29 +00:00
Shane Carr
bc9710aa8b
ICU-13738 Makes DecimalFormat#toNumberFormatter() return by const-reference.
...
X-SVN-Rev: 41327
2018-05-05 01:47:12 +00:00
Shane Carr
a52fcd20f2
ICU-13597 Replying to UNumberFormatter code recatew comments.
...
X-SVN-Rev: 41321
2018-05-04 06:58:44 +00:00
Shane Carr
0a0d99ebc8
ICU-13662 Improving NumberFormatter field position method names and behavior.
...
X-SVN-Rev: 41313
2018-05-03 01:34:19 +00:00
Shane Carr
3d0bf4b9c7
ICU-13644 Replying to review feedback. Changing enum methods on NumberFormatter to take by value instead of const reference.
...
X-SVN-Rev: 41304
2018-05-02 03:49:35 +00:00
Shane Carr
215417117e
ICU-13437 Adding error codes to NumberFormatter terminal methods.
...
X-SVN-Rev: 41296
2018-04-30 21:07:35 +00:00
Shane Carr
b20f7f3543
ICU-13725 Adding comments referencing ticket 13580.
...
X-SVN-Rev: 41291
2018-04-28 06:59:09 +00:00
Shane Carr
6545bac22d
ICU-12931 Adding internal visibility ifdef around format(DecimalQuantity) methods in numfmt.h and decimfmt.h
...
X-SVN-Rev: 41285
2018-04-28 02:38:55 +00:00
Shane Carr
c13e7785c2
ICU-13725 Fixing NumberFormatter std::move test failure on MSVC.
...
X-SVN-Rev: 41282
2018-04-26 03:38:17 +00:00
Shane Carr
18bfb67a60
ICU-13725 Moving all DecimalFormat fields to an implementation class, eliminating many MSVC warnings.
...
X-SVN-Rev: 41279
2018-04-25 23:57:10 +00:00
Shane Carr
a256316990
ICU-13725 Additional MSVC compatibility fixes.
...
X-SVN-Rev: 41272
2018-04-25 00:39:22 +00:00
Shane Carr
629238d3a1
ICU-13634 Fixing assorted build errors.
...
X-SVN-Rev: 41268
2018-04-24 01:25:05 +00:00
Shane Carr
faa2897561
ICU-13634 Changes from pre-merge code light-review.
...
X-SVN-Rev: 41267
2018-04-24 01:19:44 +00:00
Shane Carr
607a60bc3b
ICU-13393 Removing the UPRV_INCOMPLETE_CPP11_SUPPORT flag since the number formatting code is no longer isolated from the rest of ICU.
...
X-SVN-Rev: 41266
2018-04-23 23:02:26 +00:00
Shane Carr
b2be6b57a9
ICU-13597 Adding comments about thread safety to UNumberFormatter.h
...
X-SVN-Rev: 41264
2018-04-23 22:42:51 +00:00
Shane Carr
e59eb48314
ICU-13634 Refactoring getPrefixSuffix methods. In ICU4C, the pattern modifier is now accessed directly. In ICU4J, they use the same detour through the pipeline code path as before with a TODO to improve to be closer to ICU4C. In addition, in both ICU4C and ICU4J, getPrefixSuffix now uses the compiled formatter when available.
...
X-SVN-Rev: 41258
2018-04-21 08:01:19 +00:00
Shane Carr
f412770e9d
ICU-13634 A few more DecimalFormat optimizations.
...
X-SVN-Rev: 41257
2018-04-21 06:00:56 +00:00
Shane Carr
ad116997ae
ICU-13634 Optimizing and adding a basic fastpath for small ints. Greatly increases the performance of DateFormat.
...
X-SVN-Rev: 41251
2018-04-19 09:29:39 +00:00
Shane Carr
d682d1dbb1
ICU-13700 Fixing typo in APIdoc.
...
X-SVN-Rev: 41250
2018-04-19 02:41:33 +00:00
Shane Carr
f11ca0d363
ICU-13634 Fixing address sanitizer issue involving backwards-compatible UChar* behavior in CurrencyUnit constructor. The string passed to the constructor need not be NUL-terminated.
...
X-SVN-Rev: 41248
2018-04-19 01:13:17 +00:00
Shane Carr
2e41837217
ICU-13700 APIDoc tweaks for getMultiplierScale/setMultiplierScale.
...
X-SVN-Rev: 41247
2018-04-19 00:14:17 +00:00
Shane Carr
1aa5185a36
ICU-13700 Renaming new getter/setter to magnitudeScale.
...
X-SVN-Rev: 41246
2018-04-18 23:55:55 +00:00
Shane Carr
efa58f5d80
ICU-13597 Revising UNumberFormatter according to feedback: (1) adds LocalPointer; (2) makes buffer export behavior consistent; (3) removes const from unumf_closeResult; and (4) improves API docs.
...
X-SVN-Rev: 41244
2018-04-18 09:42:05 +00:00
Shane Carr
3c9b343282
ICU-13634 Adding "formatFailIfMoreThanMaxDigits" property to C++ NumberFormatter. Changing getSecondaryGroupingSize() for backwards compatibility. Other assorted test changes.
...
X-SVN-Rev: 41239
2018-04-18 03:59:39 +00:00
Shane Carr
597e3287fc
ICU-13135 Fixing and optimizing PluralFormat call site into NumberFormat in order to execute the formatting pipeline only once.
...
X-SVN-Rev: 41237
2018-04-17 10:18:42 +00:00
Shane Carr
02c492db8a
ICU-13700 Adding DecimalFormat "scale" getter/setter and implementation in the new number formatting pipeline.
...
X-SVN-Rev: 41232
2018-04-14 09:49:12 +00:00
Shane Carr
ce846b6b34
ICU-13678 Renaming Multiplier to Scale.
...
X-SVN-Rev: 41231
2018-04-14 09:45:39 +00:00
Shane Carr
354afa4e79
ICU-13697 Adding data-loading logic for parseLenients sets in CLDR. Ties the sets in with number and currency parsing in ICU4C and ICU4J.
...
X-SVN-Rev: 41223
2018-04-12 10:59:37 +00:00
Shane Carr
2c6bf0d77e
ICU-13634 Refactoring affix-getting code to avoid the need to save the micro-props. Other assorted minor changes.
...
X-SVN-Rev: 41216
2018-04-11 11:10:52 +00:00
Shane Carr
fe0725cd2a
ICU-13678 Changing Multiplier to use decNumber instead of double, in order to fix some unit tests. Refactored call sites to use a common DecNum wrapper class with constructors for string, double, and BCD.
...
X-SVN-Rev: 41198
2018-04-05 21:54:04 +00:00
Shane Carr
8ea876aadb
ICU-13678 Cleaning up multiplier implementation and adding public API.
...
X-SVN-Rev: 41188
2018-04-03 04:38:16 +00:00
Shane Carr
a5096d3075
ICU-8610 Small fixes to API docs for C++ number skeletons.
...
X-SVN-Rev: 41169
2018-03-29 00:47:26 +00:00
Shane Carr
2ede84ce47
ICU-13597 Fixing safety of toUnicodeString() readonly aliases by moving that behavior to a new method, toTempUnicodeString().
...
X-SVN-Rev: 41164
2018-03-28 03:42:12 +00:00
Shane Carr
1b4670fd29
ICU-13634 Merging trunk to branch
...
X-SVN-Rev: 41162
2018-03-28 01:08:47 +00:00
Shane Carr
aa88b7a590
ICU-13597 Reverting formatting changes to unicode/numberformatter.h introduced by r41156
...
X-SVN-Rev: 41161
2018-03-28 00:39:28 +00:00
Shane Carr
7d4b54dfc3
ICU-13597 Small API tweaks.
...
X-SVN-Rev: 41160
2018-03-27 06:07:17 +00:00
Shane Carr
395463d7a7
ICU-13597 Adding support for field positions to the NumberFormatter C API.
...
X-SVN-Rev: 41159
2018-03-27 05:36:04 +00:00
Shane Carr
3a55650b8c
ICU-13597 Adding initial C API for NumberFormatter. Not yet fully featured.
...
X-SVN-Rev: 41156
2018-03-27 01:58:26 +00:00
Shane Carr
a8f2471248
ICU-8610 Adding tests for number skeletons in C++. Adding error code handling to the setToDecNumber setter on DecimalQuantity. Refactoring char-to-uchar conversion in skeleton implementation code.
...
X-SVN-Rev: 41152
2018-03-24 05:46:28 +00:00
Shane Carr
52c665a2bd
ICU-8610 More general progress in C++; generation code is largely implemented. Probably not building yet.
...
X-SVN-Rev: 41143
2018-03-23 07:51:52 +00:00
Shane Carr
d8f2d8ce6e
ICU-8610 Dirty commit of C++ work so far. Probably does not build.
...
X-SVN-Rev: 41142
2018-03-23 06:46:19 +00:00
Shane Carr
e3180662e2
ICU-13634 Parsing wrapper is working; data-driven file is updated and passing. The C++ and Java implementations have almost identical behavior according to the data-driven test file, with the only differences seeming to involve overflow and extremely large numbers.
...
X-SVN-Rev: 41134
2018-03-21 09:48:55 +00:00
Shane Carr
c940df09e7
ICU-13644 Adds move operators and related boilerplate to NumberFormatter classes. Includes a handful of other changes made to these files on my branch for ICU-13634 .
...
X-SVN-Rev: 41121
2018-03-17 07:24:02 +00:00
Shane Carr
9828c56014
ICU-13634 Fixing remaining build warnings. In principle, formatting should work fully. Not yet tested.
...
X-SVN-Rev: 41109
2018-03-16 09:20:43 +00:00
Shane Carr
1a95c170d2
ICU-13634 Number property mapper is building. Currently there is a linker error.
...
X-SVN-Rev: 41107
2018-03-15 07:46:56 +00:00
Shane Carr
f5d2257d34
ICU-13634 Implementing localized pattern converter and other pieces.
...
X-SVN-Rev: 41104
2018-03-14 10:41:27 +00:00
Shane Carr
73fddf50d0
ICU-13634 Filling in decimfmt.cpp with implementation ported from Java.
...
X-SVN-Rev: 41103
2018-03-14 09:15:27 +00:00
Shane Carr
b30a6f0df1
ICU-13634 Filling in more methods in decimfmt.cpp
...
X-SVN-Rev: 41100
2018-03-13 10:11:36 +00:00
Shane Carr
8a50c335fa
ICU-13634 Adding new field structure to DecimalFormat and wiring up constructors.
...
X-SVN-Rev: 41099
2018-03-13 09:25:41 +00:00
Shane Carr
453788ddfd
ICU-13634 Temporarily deleting all old number formatting implementation code. Pieces will be restored as needed. ICU4C builds, including tests, but won't run. Changes in plurfmt.cpp and plurrule.cpp are not tested. numberformat2test.cpp is unlinked but not deleted.
...
X-SVN-Rev: 41098
2018-03-13 08:12:05 +00:00
Shane Carr
03e807ba6d
ICU-13402 Adding NumberFormatter pointers to compactdecimalformat.h
...
X-SVN-Rev: 41097
2018-03-13 02:19:25 +00:00
Shane Carr
24431ce7a9
ICU-13402 Tweaking NumberFormatter pointers and adding additional pointers on the factory methods in ICU4C and ICU4J.
...
X-SVN-Rev: 41096
2018-03-13 02:14:29 +00:00
Shane Carr
e190706080
ICU-13574 Reverting change of DecimalFormatSymbols::getConstSymbol to @draft from @internal.
...
X-SVN-Rev: 41076
2018-03-07 18:24:34 +00:00
Peter Edberg
61e984c3cb
ICU-13581 ICU4C 61rc BRS, update U_HIDE_ conditionals
...
X-SVN-Rev: 41075
2018-03-06 23:41:20 +00:00
Norbert Runge
63d5dc895a
ICU-13624 Public header build failures
...
X-SVN-Rev: 41070
2018-03-06 18:40:12 +00:00
Shane Carr
94427dc200
ICU-13574 Replacing DigitList with DecimalQuantity through most of the code base.
...
X-SVN-Rev: 41064
2018-03-03 10:53:01 +00:00
Shane Carr
3681a6803b
ICU-13574 Replacing decimfmt.cpp and compactdecimalformat.cpp with new, empty files. Removing most private and internal functions from decimfmt.h, and updating call sites to use newer API.
...
X-SVN-Rev: 41063
2018-03-03 08:26:58 +00:00
Shane Carr
ef04891b49
ICU-13574 Adding U_OVERRIDE to decimfmt.h and other assorted changes in that file.
...
X-SVN-Rev: 41062
2018-03-03 07:42:26 +00:00
Shane Carr
a33db79f8d
ICU-13574 Merging trunk to branch
...
X-SVN-Rev: 41061
2018-03-03 07:22:22 +00:00
Peter Edberg
b69d78b0e8
ICU-12740 use private static const int32_t, not #define, for UDATPG_WIDTH_COUNT
...
X-SVN-Rev: 41035
2018-03-01 07:21:19 +00:00
Peter Edberg
c03a13dd21
ICU-13607 ICU4C 61 API promotion
...
X-SVN-Rev: 41032
2018-03-01 05:54:24 +00:00
Shane Carr
1254850bf9
ICU-13574 Merging trunk to branch
...
X-SVN-Rev: 41004
2018-02-28 05:44:52 +00:00
Shane Carr
7f1a29ed4c
ICU-13402 Adding pointer to NumberFormatter from classes that it replaces.
...
X-SVN-Rev: 40999
2018-02-28 02:56:45 +00:00