Commit Graph

258 Commits

Author SHA1 Message Date
Daniel Ju
7453181fff ICU-20074 Define UPRV_UNREACHABLE macro for unreachable code
Replaced occurrences of U_ASSERT(FALSE) with new UPRV_UNREACHABLE macro.
2019-01-14 14:16:26 -08: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
Shane Carr
0c8fed6bde ICU-13717 During SimpleDateFormat#parseInt, avoid cloning the DecimalFormat unless necessary.
X-SVN-Rev: 41440
2018-05-23 04:21:24 +00:00
Shane Carr
d0d8535066 ICU-13717 Adds fast path for RBNF, which is not affect by min/max integer digits.
X-SVN-Rev: 41439
2018-05-23 04:03:19 +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
7d627ba160 ICU-13717 Refactoring UDAT_FRACTIONAL_SECOND_FIELD to use zeroPaddingNumber for consistency with all other number formatting call sites in smpdtfmt.cpp
X-SVN-Rev: 41433
2018-05-22 22:21:59 +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
Yoshito Umaoka
4b67416113 ICU-13446 Fixed Chakma date format fractional seconds parsing problem. Removed logKnownIssue from TestTimeZoneFormat.
X-SVN-Rev: 40647
2017-10-26 22:13:13 +00:00
Peter Edberg
0b5b91a70b ICU-13366 Changes per Shane codereview comments
X-SVN-Rev: 40572
2017-10-05 20:36:07 +00:00
Peter Edberg
0065725adc ICU-13366 part 12, fix C SimpleDateFormat::subParse handling of 2-digit years for supplemental chars
X-SVN-Rev: 40536
2017-10-03 20:36:42 +00:00
Peter Edberg
9ccab14af1 ICU-13366 part 1, fix TextTrieMap::search supplemental handling; make tz displayName buffer size bigger & logKnownIssue tests more specific
X-SVN-Rev: 40522
2017-10-02 03:42:54 +00:00
Markus Scherer
4c2fad3e36 ICU-12410 class Edits, class CaseMap with new low-level functions that work with Edits, simpler case properties code, some cleanup
X-SVN-Rev: 39684
2017-02-17 21:03:35 +00:00
Markus Scherer
5da94f206a ICU-12410 move new code into new files, split ucasemap_imp.h from ustr_imp.h
X-SVN-Rev: 39655
2017-02-09 21:15:34 +00:00
Andy Heninger
242e02c388 ICU-12764 icu4c utf-8 source files, update Copyright notices.
X-SVN-Rev: 39583
2017-01-20 00:20:31 +00:00
Andy Heninger
549c7646bf ICU-12061 FieldPosition::DONT_CARE API status and doc update. Fix incorrect usage of FieldPosition(0).
X-SVN-Rev: 39017
2016-07-23 04:42:29 +00:00
Andy Heninger
79bb830dde ICU-12527 Fix resource leaks in r38824.
X-SVN-Rev: 38876
2016-06-23 22:30:38 +00:00
Michael Ow
61607c2773 ICU-12564 Update copyright notice in trunk
X-SVN-Rev: 38848
2016-06-15 18:58:17 +00:00
Craig Cornelius
457938ebc2 ICU-12527 Updating data loading in SimpleDateFormatter, C++
X-SVN-Rev: 38824
2016-06-10 21:14:36 +00:00
Yoshito Umaoka
00ca13e126 ICU-12564 Reverted r38761 and r38762, because we want to prepend the Unicode copyright for existing source files, instead of replacing copyright comments.
X-SVN-Rev: 38776
2016-05-31 21:45:07 +00:00
Michael Ow
c9f199a30f ICU-12564 Update copyright notice in ICU4C
X-SVN-Rev: 38761
2016-05-26 22:32:17 +00:00
kazède king
f6bdf2b1ac ICU-11872 suppress output of "midnight" in formatting (C++)
X-SVN-Rev: 38485
2016-03-04 18:13:25 +00:00
Markus Scherer
a9c247a3cb ICU-12166 annotate intended switch case fallthroughs
X-SVN-Rev: 38447
2016-03-01 07:44:57 +00:00
kazède king
99a7ebbae1 ICU-11872 fix memory errors
X-SVN-Rev: 38373
2016-02-25 21:40:27 +00:00
kazède king
f8050e2adf ICU-11872 fix build errors
X-SVN-Rev: 38372
2016-02-25 21:09:04 +00:00
kazède king
f713c0687c ICU-11872 new time formatting pattern chars b/B
Merging from the branch.

X-SVN-Rev: 38370
2016-02-25 19:51:53 +00:00
Markus Scherer
bb5f37a069 ICU-7457 replace MessageFormat with SimpleFormatter where easy; remove obsolete ChoiceFormat handling of currency names; move LocaleDisplayNames & ucurr from i18n to common
X-SVN-Rev: 38200
2016-01-26 22:56:59 +00:00
Scott Russell
c179cf974c ICU-11572 API proposal updates for approved constants
X-SVN-Rev: 37961
2015-09-16 00:14:58 +00:00
Peter Edberg
7e03903fd5 ICU-11773 Improve test, fix typo (C)
X-SVN-Rev: 37900
2015-09-08 02:25:24 +00:00
Peter Edberg
49d4ab5ee6 ICU-11773 Withdraw COLON as pattern char, leave support for UDAT_TIME_SEPARATOR_FIELD (C)
X-SVN-Rev: 37898
2015-09-07 22:39:49 +00:00
Peter Edberg
7d74634fa5 ICU-11433 BRS, no U_HIDE conditionals around impl code or private fields; fix comment typos
X-SVN-Rev: 37234
2015-03-16 04:15:28 +00:00
Peter Edberg
3076cb2149 ICU-11510 C: Support narrow AM/PM "aaaaa" for date format and parse
X-SVN-Rev: 37124
2015-03-04 05:43:28 +00:00
Peter Edberg
c56a20e796 ICU-11539 C: Delete Calendar fields TIME_SEPARATOR, RELATED_YEAR; adjust accordingly
X-SVN-Rev: 37091
2015-02-27 09:01:31 +00:00
Yoshito Umaoka
72a0e9b14f ICU-11294 Fixed a compiler warning, and a typo in the previous commit.
X-SVN-Rev: 37068
2015-02-26 00:08:39 +00:00
Yoshito Umaoka
ebe09a9e69 ICU-11294 Changed SimpleDateFormat and other implementation to reduce malloc calls for common date formatting/parsing operations.
X-SVN-Rev: 37064
2015-02-25 03:24:19 +00:00
Michael Ow
7dff411df7 ICU-11452 Improve null check
X-SVN-Rev: 36981
2015-01-22 19:26:09 +00:00
Michael Ow
c7cd5c468b ICU-11452 Change reference to pointer to avoid null reference problems in SimpleDateFormat
X-SVN-Rev: 36942
2015-01-12 19:02:31 +00:00
Fredrik Roubert
60087d06a1 ICU-11018 Refactor date format string mapping code (ICU4C)
To make this code more maintainable: Make mapping tables zero based, add
a table to tell if a character can be used to define a field in a format
string (instead of now rather long-winded character range expressions)
and make all lookup tables accessed through helper functions.

R=rocketman@google.com

Review URL: https://codereview.appspot.com/190080043

X-SVN-Rev: 36899
2014-12-19 07:27:58 +00:00
Fredrik Roubert
17b8600e8e ICU-11018 Support CLDR time separator (ICU4C)
This change will treat the ':' character in patterns as a symbol
(instead of as a literal) and if the Locale defines timeSeparator then
use that character instead when formatting and accept both when parsing.

It will also define the '.' as an alternate time separator, that will be
accepted when parsing in lenient mode.

This is one character more strict than before, when in lenient mode also
the '-' was accepted as time separator instead of ':'.

R=rocketman@google.com

Review URL: https://codereview.appspot.com/180610043

X-SVN-Rev: 36897
2014-12-19 07:19:41 +00:00
Andy Heninger
ea29e154b5 ICU-11452 Remove NULL check causing a compile warning. An alternate check is still needed.
X-SVN-Rev: 36896
2014-12-19 02:34:24 +00:00
Michael Ow
f61f05e5f5 ICU-11313 Fix some no data test failures
X-SVN-Rev: 36865
2014-12-12 04:34:51 +00:00
Travis Keep
00c6bb79bf ICU-11295 Fix getNumberFormatForField so that it returns either a valid pointer or NULL.
X-SVN-Rev: 36822
2014-12-08 19:35:38 +00:00
Travis Keep
a6bc072149 ICU-11401 Reduce cache keyspace by caching only the components of DateFormat by locale rather than actual DateFormat objects.
X-SVN-Rev: 36811
2014-12-05 18:15:35 +00:00
Travis Keep
4860c7e5b7 ICU-11139 Add JAVA DateFormat factory methods to C++
X-SVN-Rev: 36745
2014-11-18 00:43:49 +00:00
Steven R. Loomis
11462b188e ICU-11131 revert to r36481
X-SVN-Rev: 36484
2014-09-11 22:55:13 +00:00
Steven R. Loomis
482e90080c ICU-11131 re-checking in due to conflicts with r36481..
X-SVN-Rev: 36483
2014-09-11 22:47:47 +00:00
Yoshito Umaoka
f7ee04ba38 ICU-11131 Updates based on review feedback.
X-SVN-Rev: 36481
2014-09-11 22:36:46 +00:00
Steven R. Loomis
9e20f6ebb2 ICU-11131 on low memory situations, return U_MEMORY_ALLOCATION_ERROR instead of crash
X-SVN-Rev: 36430
2014-09-10 15:39:02 +00:00