Commit Graph

15 Commits

Author SHA1 Message Date
Jeff Genovy
7302079653 ICU-21000 Fix abort called by DateTimePatternGenerator::getDefaultHourCycle
If you call the API getDefaultHourCycle on an empty DateTimePatternGenerator
instance (ie: no locale) then it calls UPRV_UNREACHABLE which calls abort().
We should return an error code instead of aborting.
2020-03-05 18:19:04 -08:00
Shane Carr
46c86b47cc ICU-20629 Fixing DTPG hour-format locale and region fallback logic.
Includes changes in C and J.  Makes region.cpp no longer depend on DecimalFormat.  See also: CLDR-13071, ICU-20640, ICU-9982.
2019-05-29 16:37:40 -07:00
Jeff Genovy
693adf3987 ICU-20558 Fix regression in DateTimePatternGenerator
This fixes a regression introduced by commit 
b12a927c93 for issue ICU-13778.

The above commit improved the error checking in the
DateTimePatternGenerator class, adding checks for errors/failures
where there previously was none at all. This was done in order to
catch catastrophic errors like out-of-memory (OOM), and properly
report them to the caller, rather than ignoring/hiding these errors.

However, in doing so it exposed a case where the code was depending
on ignoring errors in order to fall-back to the Gregorian calendar
when the default ICU locale is set to root.

This restores the previous behavior, by allowing the error of
U_MISSING_RESOURCE_ERROR to fall-though and continue without
reporting back an error to the caller.

Note: This regression was technically introduced in ICU 63, and
also effects ICU 64 as well.
2019-04-25 10:52:06 -07:00
Peter Edberg
2b82c096e0 ICU-20383 DateTimePatternGen should map 'j' using timeData, not short time cycle (#419) 2019-02-17 19:55:52 -08:00
Peter Edberg
3ca0f3beeb ICU-12740 getFieldDisplayName C++ tests
X-SVN-Rev: 41012
2018-02-28 07:26:03 +00:00
Peter Edberg
7dd19b65ab ICU-13183 on branch - Handle abB as normal fields but force add/remove depending on hour field; other fixes
X-SVN-Rev: 40124
2017-05-22 06:16:11 +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
Michael Ow
61607c2773 ICU-12564 Update copyright notice in trunk
X-SVN-Rev: 38848
2016-06-15 18:58:17 +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
e7d56c1f66 ICU-11872 port date time pattern generator char 'C' from Java to C++
X-SVN-Rev: 38397
2016-02-27 00:41:21 +00:00
Fredrik Roubert
25f9110090 ICU-11985 Handle 'j' and 'J' in date time pattern skeletons.
R=mark.edward.davis@gmail.com, markus.icu@gmail.com, pedberg@apple.com

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

X-SVN-Rev: 38089
2015-11-18 12:29:17 +00:00
Peter Edberg
ebea161b11 ICU-10065 In DateTimePatternGenerator, add support for pattern chars K,O,X,x, adjust support for V
X-SVN-Rev: 34256
2013-09-10 07:51:38 +00:00
Peter Edberg
98723ad2bd ICU-7180 For hour field, change default behavior to not adjust pattern
field length to match requested skeleton. For getBestPattern,replaceFieldTypes
add option to override this, forcing pattern field length to match skeleton.

X-SVN-Rev: 27036
2009-12-10 09:13:49 +00:00
Claire Ho
efe2014ed1 ICU-5787 merge from feature branch revision 22024:22252.
X-SVN-Rev: 22260
2007-08-03 18:43:04 +00:00