Commit graph

32676 commits

Author SHA1 Message Date
Frank Tang
fbc1f33e7e ICU-22679 Clean up Calendar code.
1. Remove redudant implementation of default system ceuntry by using
   macro
2. Fold long if / else block if one block return.
2024-03-21 09:50:10 -07:00
dependabot[bot]
94305fc59b ICU-22532 Bump the github-actions group with 9 updates
See #2916
2024-03-21 09:45:50 -07:00
Fredrik Roubert
028fa70c29 ICU-22701 Bugfix: Make test independent of the default locale.
The original intention behind this test case was to use the root locale,
but ures_getFunctionalEquivalent() is implemented by calling ures_open()
which sets URES_OPEN_LOCALE_DEFAULT_ROOT which will cause the default
locale to be loaded before the root locale.

To avoid that, pick a locale other than the root locale for the test.
2024-03-21 09:16:05 -07:00
Fredrik Roubert
e246d3b712 ICU-22643 Make UCHAR_TYPE work as intended with C++11, C11 & macOS.
Since ICU4C requires C++11 and C11 the char16_t data type can be used
everywhere, as long as the uchar.h header file gets included when
building as C (where it isn't a keyword as in C++), but this doesn't
work on macOS which for unknown reasons lacks the uchar.h header file
and therefore needs a workaround to define char16_t.
2024-03-21 15:44:20 +01:00
Fredrik Roubert
91721504ef ICU-22621 Clang-Tidy: modernize-return-braced-init-list
https://releases.llvm.org/17.0.1/tools/clang/tools/extra/docs/clang-tidy/checks/modernize/return-braced-init-list.html
2024-03-21 13:50:45 +01:00
Pedro Kaj Kjellerup Nacht
80a01a475b ICU-22482 Hash-pin GHA, add dependabot to keep them updated
Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>

Use latest version, uses a version >= 2.0.6 to overcome invalid key bug
2024-03-20 22:14:52 -07:00
Markus Scherer
5e95ed8294 ICU-22689 reminder for 16.0 update 2024-03-20 15:49:44 -07:00
Frank Tang
0b77215040 ICU-22698 Clean up CalendarAstronomer 2024-03-20 13:36:17 -07:00
Markus Scherer
cce162bf4d ICU-11396 new properties Identifier_Status & Identifier_Type
See #2879
2024-03-20 13:20:14 -07:00
Elango Cheran
1be861209e ICU-22689 Add PPUCD-based data driven test for binary props
See #2889
2024-03-20 09:11:57 -07:00
Frank Tang
7a3dfe877d ICU-22679 Remove getType and string comparsion
Change the logic of handling year in era 0 counting backwards
to depend on a boolean virtual function instead of adding
string comparsion code in the base class to have specific knowledge of
behavior of subclass.
2024-03-19 17:44:37 -07:00
Frank Tang
6b67715a94 ICU-22633 Fix hang on large negative day in hebrew calendar
Check error status and return error early in the loop
2024-03-19 16:32:06 -07:00
Fredrik Roubert
7c22ff7541 ICU-22621 Clang-Tidy: readability-string-compare
https://releases.llvm.org/17.0.1/tools/clang/tools/extra/docs/clang-tidy/checks/readability/string-compare.html
2024-03-19 15:55:56 +01:00
Fredrik Roubert
ade671e252 ICU-22621 Clang-Tidy: readability-static-definition-in-anonymous-namespace
https://releases.llvm.org/17.0.1/tools/clang/tools/extra/docs/clang-tidy/checks/readability/static-definition-in-anonymous-namespace.html
2024-03-19 15:55:56 +01:00
Fredrik Roubert
6ad78a08c7 ICU-22621 Clang-Tidy: readability-redundant-control-flow
https://releases.llvm.org/17.0.1/tools/clang/tools/extra/docs/clang-tidy/checks/readability/redundant-control-flow.html
2024-03-19 15:55:56 +01:00
Fredrik Roubert
e017edc97d ICU-22621 Clang-Tidy: readability-qualified-auto
https://releases.llvm.org/17.0.1/tools/clang/tools/extra/docs/clang-tidy/checks/readability/qualified-auto.html
2024-03-19 15:55:56 +01:00
DraganBesevic
4f2cefb7ca ICU-22534 Integrate CLDR 45 release beta1 2024-03-18 20:49:00 -07:00
Frank Tang
606623cf30 ICU-22679 Refactor ChineseCalendar
See #2898
2024-03-18 18:51:27 -07:00
Markus Scherer
16b87419ed ICU-22612 remove obsolete comment 2024-03-18 17:13:53 -07:00
Rich Gillam
281d8ef140 ICU-22152 Uncommented a bunch of commented-out test cases in ULocaleCollationTest.TestNameList() and made them pass again. 2024-03-18 17:01:14 -07:00
Fredrik Roubert
ce052f52c2 ICU-22621 Clang-Tidy: readability-delete-null-pointer
https://releases.llvm.org/17.0.1/tools/clang/tools/extra/docs/clang-tidy/checks/readability/delete-null-pointer.html
2024-03-18 17:14:23 +01:00
Fredrik Roubert
cbab919682 ICU-22621 Clang-Tidy: readability-container-size-empty
https://releases.llvm.org/17.0.1/tools/clang/tools/extra/docs/clang-tidy/checks/readability/container-size-empty.html
2024-03-18 17:14:23 +01:00
Fredrik Roubert
2295478716 ICU-22621 Clang-Tidy: readability-const-return-type
https://releases.llvm.org/17.0.1/tools/clang/tools/extra/docs/clang-tidy/checks/readability/const-return-type.html
2024-03-18 17:14:23 +01:00
Younies Mahmoud
4405c543ad ICU-22686 Fix Unit preferences calculation in Cpp 2024-03-18 13:23:58 +01:00
Younies Mahmoud
80b33416e8 ICU-22686 Fix Unit preferences calculation in Java
See #2899
2024-03-18 13:23:37 +01:00
Frank Tang
a1c5294ae7 ICU-22679 Remove duplicate code inside Islamic calendar 2024-03-15 16:25:52 -07:00
Frank Tang
f709987818 ICU-22679 Refactor Islamic Calendar and Optmize starting condition of loop.
Refactor different rules into implementation of private interface Algorithm.
Since IslamicCalendar is public in Java (not in C++), we cannot put them into different subclass of Calendar and have to let them use the same class and object since the caller UNFORTUNALLY can call setCalculationType and setCivil to change the object to different rule. With this refactoring, we group the formula for the same rule into the same Algorithm
implementaiton and now we only do the if/switch check in the constructor or during the call of setCalculationType and setCivil only. The calculation operation is then just delegate the work to the assigned concrete Algorithm.

Improve the efficency while the month is very large. Apply the same optimization in PR 2853 which estimate starting point of year iteration based on an inverse calculation.

ICU-22679 change parameter name

ICU-22679 Use Consumer
2024-03-15 15:01:51 -07:00
Fredrik Roubert
5401c12018 ICU-22621 Clang-Tidy: modernize-use-nullptr
https://releases.llvm.org/17.0.1/tools/clang/tools/extra/docs/clang-tidy/checks/modernize/use-nullptr.html
2024-03-15 14:31:54 +01:00
Frank Tang
de9910659d ICU-22661 Limit the size of variants in Locale
See #2821
2024-03-14 16:23:51 -07:00
Elango Cheran
104214aeae ICU-22532 Use previous Ubuntu version for ICU4C in GH Actions CI for now 2024-03-14 16:20:49 -07:00
Rich Gillam
c771fc444f ICU-22523 Cut down the large tables in the APIs docs for SimpleDateFormat and included a link to the full table
in the LDML spec.
2024-03-14 14:32:29 -07:00
Rich Gillam
2b6ddc50fe ICU-22202 Fixed DateIntervalFormat to solve a couple "conflicting fields" errors. 2024-03-14 14:31:48 -07:00
DraganBesevic
b396885aae ICU-22534 Integrate CLDR 45 release alpha 3, part 4, update supplementalData to rollback root changes 2024-03-14 08:30:09 -07:00
DraganBesevic
1b2d28b042 ICU-22534 Integrate CLDR 45 release alpha 3, part 3, source files 2024-03-14 08:30:09 -07:00
DraganBesevic
fc18bcb05f ICU-22534 Integrate CLDR 45 release alpha 3, part 2, data files 2024-03-14 08:30:09 -07:00
DraganBesevic
0906aae169 ICU-22534 Integrate CLDR 45 release alpha 3, part 1, binary files 2024-03-14 08:30:09 -07:00
Frank Tang
9a912bb51b ICU-22633 Add more Calendar overflow tests
Test set+set, set+add, set+roll, add+add, roll+roll
Fix more int32_t overflow problems.

Optimize both Java and C++ Hebrew Calendar month/year advancement by first consider
every 235 months is 19 years before iteration.
2024-03-13 15:48:25 -07:00
Fredrik Roubert
2a1853c9a9 ICU-22621 Clang-Tidy: modernize-use-emplace
https://releases.llvm.org/17.0.1/tools/clang/tools/extra/docs/clang-tidy/checks/modernize/use-emplace.html
2024-03-13 16:31:47 +01:00
Fredrik Roubert
3000bfb67e ICU-22621 Clang-Tidy: modernize-make-unique
https://releases.llvm.org/17.0.1/tools/clang/tools/extra/docs/clang-tidy/checks/modernize/make-unique.html
2024-03-13 16:31:47 +01:00
Fredrik Roubert
1a4fc9b009 ICU-22621 Clang-Tidy: modernize-concat-nested-namespaces
https://releases.llvm.org/17.0.1/tools/clang/tools/extra/docs/clang-tidy/checks/modernize/concat-nested-namespaces.html
2024-03-13 16:31:47 +01:00
Rich Gillam
00072801a5 ICU-22687 Fix genren.pl not to skip C++ functions on Mac 2024-03-12 16:56:26 -07:00
Rich Gillam
1cedbbd90d ICU-22534 Fixed a couple issues from the API-promotions PR that Frank found in code review. 2024-03-12 16:47:57 -07:00
Frank Tang
d43d216feb ICU-22633 Test and fix int32_t overflow for Calendar set
Add test to set with INT32_MAX and INT32_MIN then call getTime()
and fix all the undefined errors.
2024-03-12 16:46:53 -07:00
Elango Cheran
18c7d48b3e ICU-22533 Add docs on Continuous Integration
See #2876
2024-03-12 09:14:24 -07:00
Shuhei Iitsuka
37ecee3a0c ICU-22666 Update ML model to improve Japanese phrase breaking quality 2024-03-11 12:00:03 -07:00
Peter Edberg
ceee4f0b46 ICU-22655 Implement "special" conversion for speed-beaufort, part 2 icu4c 2024-03-09 19:52:42 -08:00
Rich Gillam
4c664b2180 ICU-22534 Changed ExternalBreakEngine so that it's surrounded by U_HIDE_INTERNAL_API instead of U_HIDE_DRAFT_API. 2024-03-08 17:49:33 -08:00
Frank Tang
784056dfdb ICU-22633 Fix overflow in Chinese calendar
Fix issue found by https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=67256
2024-03-07 16:03:00 -08:00
Craig
ebaf3e9f75 ICU-22534 BRS#19 Update ICU4C API Change Report (frontloading) 2024-03-07 14:37:06 -08:00
Fredrik Roubert
3a88e99a27 ICU-22520 Add a StringByteSink<CharString> template specialization.
This makes it possible to call public functions that take a string class
as a template parameter and return an object of that class (implemented
through the StringByteSink helper class) also with the CharString class,
even though this class doesn't actually provide the public API required
by StringByteSink.

This makes it possible to use such more modern APIs also internally.
2024-03-07 17:35:48 +01:00