Commit graph

6317 commits

Author SHA1 Message Date
Frank Tang
77bc51e03e ICU-22479 Add fuzzer for RelativeTimeFormatFuzzer
And also fix a bug by checking the unit
2023-09-21 14:50:35 -07:00
Frank Tang
4fcf8d22b9 ICU-22507 Fix stack overflow in ChineseCalendar::isLeapMonthBetween
Rewrite the recursive call to while loop to avoid stack overflow
when the two values have big gap.
Include tests to verify the problem in unit test.
2023-09-20 23:56:15 -07:00
Frank Tang
6a42197331 ICU-22510 Fix Calendar::set to check the field is valid. 2023-09-20 13:50:56 -07:00
Frank Tang
87d606c39a ICU-22509 Fix the RelativeDateFormat to reject unsupported dateStyle 2023-09-20 12:02:57 -07:00
Frank Tang
c4a596e18e ICU-22508 Reject NaN as input to Calendar::setTime
Fix DateFormat::format issue
2023-09-19 15:55:02 -07:00
Rich Gillam
14ca2b0e6d ICU-22313 Various fixes for duration formatting:
- Changed the C++ and Java interfaces to that the URBNF_DURATION ruleset is marked deprecated.
- Fixed a bug in RuleBasedNumberFormat in both Java and C++ that caused the existing duration-formatting rules to produce bogus results when used on a non-integral value.

(Earlier versions of this PR added code to use a MeasureFormat under the covers when a caller used
unum_open(UNUM_DURATION).  I took that out because of backward compatibility concerns, so we're still using RBNF
in the C API.  I'm hoping to add a "real" duration formatter in ICU 75.)
2023-09-15 16:27:58 -07:00
Frank Tang
9e9bc3695f ICU-22489 Clarify the default setting of Collator
See #2595
2023-09-14 10:05:36 -07:00
DraganBesevic
bb7352990e ICU-22325 CLDR 44 alpha2 integration to ICU part three, source files changes 2023-09-13 11:06:53 -07:00
Craig
6d178fd002 ICU-22325 Update ICU4C API Change Reports - frontload
Change version on uspoof.h from "74.0" to "74"
2023-09-12 16:15:11 -07:00
Rich Gillam
b6a4eb8a65 ICU-22325 Promoted all @draft ICU 72 APIs to @stable ICU 72. 2023-09-06 14:03:05 -07:00
Rich Gillam
21f74b3698 ICU-22455 Implemented algorithm in CLDR-16981 to preserve regional unit overrides when they don't conflict
with the ms subtag.
2023-09-05 16:52:18 -04:00
Rich Gillam
8817c25c1e ICU-22449 Fixed SimpleDateFormat (in C++ and Java) to correctly honor the rg and hc subtags in the locale when choosing the hour cycle. 2023-08-28 13:30:45 -04:00
Robin Leroy
f79fe9347a ICU-22332 bidiSkeleton and LTR- and RTL-confusabilities 2023-08-23 15:56:02 +02:00
Peter Edberg
2270c174a5 ICU-22325 CLDR release-44-alpha1 to main:
- binaries, binary-as-source, CLDR data sources;
  - CLDR test data & dtd, ICU lib/tool/test source updates.
2023-08-22 14:40:51 -07:00
Markus Scherer
81a6edb287 ICU-22404 Unicode 15.1 data 20230811 plus UTS46 fix 2023-08-16 14:25:22 -07:00
yumaoka
6338b704ff ICU-22452 API for resolving preferred IANA zone ID from a zone ID. 2023-08-11 17:00:05 -04:00
Robin Leroy
a6fc915e05 ICU-22404 Strip default ignorable code points in the skeleton for confusable detection 2023-08-10 17:55:14 +02:00
DraganBesevic
1f07d2b29f ICU-22325 Integrate CLDR 44.1 to ICU, add personName testdata, fix RBBITestMonkey 2023-07-28 16:53:50 -07:00
Frank Tang
19bac42f98 ICU-22446 Fix incorrect Hebrew ORDINAL MONTH bug 2023-07-27 22:18:00 -07:00
Frank Tang
03e98c04f3 ICU-22442 Sync the spelling of NEHASSA to ICU4J NEHASSE
ICU4J has that as part of public API but ++ is private
so we should sync to the ICU4J one.
2023-07-27 09:56:31 -07:00
Shane F. Carr
2238f1c2c1 ICU-20297 Improve discoverability of currency formatting 2023-07-23 09:23:13 -07:00
Jiawen Geng
c7e967c456 ICU-22401 fix build on MSVC with cpp20 2023-07-14 14:31:40 +02:00
Elango Cheran
2e45e6ec0e ICU-22404 Unicode 15.1 beta data files & API constants
See #2492

Co-authored-by: Andy Heninger <andy.heninger@gmail.com>
Co-authored-by: Robin Leroy <egg.robin.leroy@gmail.com>
2023-07-13 19:26:14 -07:00
Frank Tang
5826bf7ed7 ICU-22434 Not calling setFirstDayOfWeek(MONDAY) if the locale has fw
The Calendar constructor already take care of the fw override.
We should not set the first day of week for iso8601 to Monday if
we have a fw keyword/type in the locale.

ICU-22434 Fix incorrect calendar keyword extraction
2023-07-13 09:49:32 -07:00
Frank Tang
1b15a4e9db ICU-22424 Fix Calendar::clear(UCAL_MONTH)
Make the calling of clear(UCAL_MONTH or UCAL_ORDINAL_MONTH) clear both fields.
2023-06-30 00:48:34 -07:00
Shane F. Carr
4a255c4301 ICU-21239 Improve docs for MeasureUnit default constructor 2023-06-27 11:27:25 -07:00
Victor Chang
83ee7e662f ICU-22390 Transliterator.<clinit> can be optimized - part 2
WIDTH_FIX instance could be lazily initialized, because it's used
only if transliterate() is called on the AnyTransliterator instance,
but apparently not used by other Transliterator instance.
2023-06-27 11:25:43 -07:00
Frank Tang
a9f7570892 ICU-22412 Fix C API ucal_(g|s)etGregorianChange for iso8601 calendar
See #2510
2023-06-22 15:44:37 -07:00
Frank Tang
26bd70e301 ICU-22421 Remove two unused internal methods in gregorian cal
Remove pinDayOfMonth() and yearLength(int32_t year)
from GregorianCalendar.

These two methods are
1. Unused by any code inside ICU, not in source/{common,i18n,test}.
2. Marked as @internal in the header.
3. Wrap inside #ifndef U_HIDE_INTERNAL_API block in the header
4. In "protected:" section.
5. No ICU4J counterpart.

The yearLength(int32_t year) dup the functionality as
handleGetYearLength of the same class and that one is the correct one to
be keep and used..
There is another yearLength() w/o the year as parameter should NOT be
removed and still needed internally.
2023-06-22 15:44:05 -07:00
Henri Sivonen
3fec4e718e ICU-22260 Allow relative datetime formatting without context adjustment with UCONFIG_NO_BREAK_ITERATION 2023-06-20 18:48:01 -07:00
Frank Tang
9411a940ea ICU-22414 Fix bogus locale in collation res fallback 2023-06-14 11:30:00 -07:00
Mihai Nita
00bb6789b3 ICU-22323 Remove broken link from the Chinese Calendar documentation 2023-05-03 10:51:22 -07:00
Mihai Nita
0e4b10b112 ICU-22378 Fix temperature format ignoring -u-mu-fahrenhe 2023-05-03 09:24:53 -07:00
Rich Gillam
7d4e57dff1 ICU-22340 Fix it so that UNUM_NUMBERING_SYSTEM again always returns a RuleBasedNumberFormat.
(cherry picked from commit c702950294)
2023-04-07 10:13:51 -07:00
Peter Edberg
c125cf67f0 ICU-22337 restore strict parsing length tolerance for non-abutting numeric date fields 2023-03-30 13:52:40 -07:00
Peter Edberg
70ed5b4702 ICU-21940 DateFormatSymbols::assignArray should handle null srcArray 2023-03-17 08:52:19 -07:00
Frank Tang
3d31e72633 ICU-22307 Fix crash inside TimeZone
Return while the status fail without checking and cause crash
2023-03-16 17:05:02 -07:00
Alan Zhao
7ed7d42f58 ICU-22298 Include <utility> in measunit.h
measunit.h uses std::pair, std::make_pair, and std::move, all of which
are declared in the <utility> header. This still compiles because many
implementations of the C++ standard library have <utility> as a
transitive dependency of other C++ standard library headers; however,
these transitive includes are not guaranteed to exist and will not exist
in some contexts (e.g. building against LLVM's libc++ with -fmodules).
2023-03-14 17:08:53 -07:00
Shane F. Carr
2a9d0ccdb2 ICU-22283 Add additional ERoundingMode variants
See #2329
2023-03-14 00:51:42 -07:00
Peter Edberg
3748ef8f8a ICU-22220 adjust #ifndef U_HIDE_DRAFT_API for virtual methods, fix conditionalized enums 2023-03-06 11:01:50 -08:00
Markus Scherer
b6dcc95d3c ICU-21833 remove redundant void parameter lists
See #2351
2023-03-02 09:31:57 -08:00
Markus Scherer
2864379937 ICU-21833 replace U_NOEXCEPT with C++11 standard noexcept 2023-03-01 15:24:34 -08:00
Markus Scherer
d8e80fea88 ICU-21833 remove pre-C++11 code; U_SIZEOF_UCHAR=2 2023-03-01 15:23:34 -08:00
Frank Yung-Fong Tang
80414a247b ICU-22224 Enable UBSAN and fix breakage
See #2324
2023-02-27 17:31:49 -08:00
Fredrik Roubert
ea2cb8549e ICU-21833 Replace U_FINAL with final everywhere. 2023-02-22 22:39:41 +01:00
Fredrik Roubert
a3cbe80909 ICU-21833 Replace U_OVERRIDE with override everywhere. 2023-02-22 18:28:07 +01:00
Frank Yung-Fong Tang
47b321f1fa ICU-22277 correct collation error return of uninitialized length value while previous code return error
See #2320
2023-02-13 14:24:33 -08:00
Rich Gillam
288c4c7555 ICU-22220 ICU 73 API promotions (promoting ICU 71 and earlier) 2023-02-09 16:44:56 -08:00
Frank Tang
638acd0c38 ICU-21374 Add a CFI build bot for ICU4C
Add the github action bot to build with cfi
Also fix all the known issues which require the change from C style cast to
static_cast inside the i18n and common directory while we are sure about
the object. and use
C++ style dynamic_cast for base-to-derive cast in other code inside i18n
and common and in test code or tool.
Change to use const_cast for casting between const / non-const
2023-02-06 15:47:14 -08:00
Peter Edberg
87fc840bf7 ICU-22220 CLDR release-43-alpha0 (with SurveyTool data) to ICU main 2023-02-06 14:46:14 -08:00