ICU-23102 Refactor and simplify Calendar code
Some checks failed
CIFuzz / Fuzzing (address) (push) Has been cancelled
CIFuzz / Fuzzing (undefined) (push) Has been cancelled
GHA ICU4C / icu4c-docs-build (push) Has been cancelled
GHA ICU4C / gcc-debug-build-and-test (push) Has been cancelled
GHA ICU4C / gcc11-cpp20 (push) Has been cancelled
GHA ICU4C / clang-release-build-and-test (push) Has been cancelled
GHA ICU4C / clang-options-build-and-test (--enable-static --disable-shared) (push) Has been cancelled
GHA ICU4C / clang-options-build-and-test (--enable-static) (push) Has been cancelled
GHA ICU4C / gcc-10-stdlib17 (push) Has been cancelled
GHA ICU4C / clang-asan (push) Has been cancelled
GHA ICU4C / clang-lsan (push) Has been cancelled
GHA ICU4C / clang-ubsan (push) Has been cancelled
GHA ICU4C / clang-cfi (push) Has been cancelled
GHA ICU4C / clang-tsan (push) Has been cancelled
GHA ICU4C / clang-datafilter (push) Has been cancelled
GHA ICU4C / clang-cpp17 (push) Has been cancelled
GHA ICU4C / clang-lang-with-extn-tags (push) Has been cancelled
GHA ICU4C / clang18-cpp20-warning-as-errors (-std=c++20 -stdlib=libc++) (push) Has been cancelled
GHA ICU4C / clang18-cpp20-warning-as-errors (-std=c++20) (push) Has been cancelled
GHA ICU4C / macos-clang (push) Has been cancelled
GHA ICU4C / windows-msvc (/p:Configuration=Debug /p:Platform=Win32, x86 Debug) (push) Has been cancelled
GHA ICU4C / windows-msvc (/p:Configuration=Debug /p:Platform=x64, x64 Debug) (push) Has been cancelled
GHA ICU4C / windows-msvc (/p:Configuration=Release /p:Platform=ARM, arm Release) (push) Has been cancelled
GHA ICU4C / windows-msvc (/p:LanguageStandard=stdcpplatest /p:Configuration=Release /p:Platform=x64, x64 Release) (push) Has been cancelled
GHA ICU4C / windows-msvc (/p:_HAS_EXCEPTIONS=0 /p:Configuration=Release /p:Platform=x64, x64 Release) (push) Has been cancelled
GHA ICU4C / windows-msvc-datafilter (push) Has been cancelled
GHA ICU4C / windows-msvc-dist-release (arm64, ARM64, WinARM64) (push) Has been cancelled
GHA ICU4C / windows-msvc-dist-release (x64, x64, Win64) (push) Has been cancelled
GHA ICU4C / windows-msvc-dist-release (x86, Win32, Win32) (push) Has been cancelled
GHA ICU4C / windows-msys2-gcc-x86_64 (push) Has been cancelled
GHA ICU4C / run-with-stubdata (push) Has been cancelled
GHA ICU4C / u-charset-is-utf8-test (push) Has been cancelled
GHA ICU4C / u-override-cxx-allocation-is-0-test (push) Has been cancelled
GHA ICU4C / lstm-test (push) Has been cancelled
GHA ICU4C / adaboost-test (push) Has been cancelled
GHA ICU4C / testmap (push) Has been cancelled
GHA ICU4C / copyright-scan (push) Has been cancelled
GHA ICU4C / internal-header-compilation (push) Has been cancelled
GHA ICU4C / valid-UTF-8-and-no-BOM-check (push) Has been cancelled
GHA ICU4C / uconfig-unit-tests (-DUCONFIG_NO_BREAK_ITERATION=1) (push) Has been cancelled
GHA ICU4C / uconfig-unit-tests (-DUCONFIG_NO_COLLATION=1) (push) Has been cancelled
GHA ICU4C / uconfig-unit-tests (-DUCONFIG_NO_FILTERED_BREAK_ITERATION=1) (push) Has been cancelled
GHA ICU4C / uconfig-unit-tests (-DUCONFIG_NO_FORMATTING=1) (push) Has been cancelled
GHA ICU4C / uconfig-unit-tests (-DUCONFIG_NO_IDNA=1) (push) Has been cancelled
GHA ICU4C / uconfig-unit-tests (-DUCONFIG_NO_LEGACY_CONVERSION=1 -DUCONFIG_NO_NORMALIZATION=1 -DUCONFIG_NO_BREAK_ITERATION=1 -DUCONFIG_NO_IDNA=1 -DUCONFIG_NO_COLLATION=1 -DUCONFIG_NO_FORMATTING=1 -DUCONFIG_NO_MF2=1 -DUCONFIG_NO_TRANSLITERATION=1 -DUCONFIG_NO_REGUL… (push) Has been cancelled
GHA ICU4C / uconfig-unit-tests (-DUCONFIG_NO_LEGACY_CONVERSION=1) (push) Has been cancelled
GHA ICU4C / uconfig-unit-tests (-DUCONFIG_NO_MF2=1) (push) Has been cancelled
GHA ICU4C / uconfig-unit-tests (-DUCONFIG_NO_NORMALIZATION=1) (push) Has been cancelled
GHA ICU4C / uconfig-unit-tests (-DUCONFIG_NO_REGULAR_EXPRESSIONS=1) (push) Has been cancelled
GHA ICU4C / uconfig-unit-tests (-DUCONFIG_NO_SERVICE=1) (push) Has been cancelled
GHA ICU4C / uconfig-unit-tests (-DUCONFIG_NO_TRANSLITERATION=1) (push) Has been cancelled
GHA ICU4C / uconfig-header-tests (-DUCONFIG_NO_BREAK_ITERATION=1) (push) Has been cancelled
GHA ICU4C / uconfig-header-tests (-DUCONFIG_NO_COLLATION=1) (push) Has been cancelled
GHA ICU4C / uconfig-header-tests (-DUCONFIG_NO_FILTERED_BREAK_ITERATION=1) (push) Has been cancelled
GHA ICU4C / uconfig-header-tests (-DUCONFIG_NO_FORMATTING=1) (push) Has been cancelled
GHA ICU4C / uconfig-header-tests (-DUCONFIG_NO_IDNA=1) (push) Has been cancelled
GHA ICU4C / uconfig-header-tests (-DUCONFIG_NO_LEGACY_CONVERSION=1 -DUCONFIG_NO_NORMALIZATION=1 -DUCONFIG_NO_BREAK_ITERATION=1 -DUCONFIG_NO_IDNA=1 -DUCONFIG_NO_COLLATION=1 -DUCONFIG_NO_FORMATTING=1 -DUCONFIG_NO_MF2=1 -DUCONFIG_NO_TRANSLITERATION=1 -DUCONFIG_NO_REG… (push) Has been cancelled
GHA ICU4C / uconfig-header-tests (-DUCONFIG_NO_LEGACY_CONVERSION=1) (push) Has been cancelled
GHA ICU4C / uconfig-header-tests (-DUCONFIG_NO_MF2=1) (push) Has been cancelled
GHA ICU4C / uconfig-header-tests (-DUCONFIG_NO_NORMALIZATION=1) (push) Has been cancelled
GHA ICU4C / uconfig-header-tests (-DUCONFIG_NO_REGULAR_EXPRESSIONS=1) (push) Has been cancelled
GHA ICU4C / uconfig-header-tests (-DUCONFIG_NO_SERVICE=1) (push) Has been cancelled
GHA ICU4C / uconfig-header-tests (-DUCONFIG_NO_TRANSLITERATION=1) (push) Has been cancelled
GHA ICU4C / unicode-update-tools (push) Has been cancelled
GHA ICU4C / icu4c-test-samples (push) Has been cancelled
GHA ICU4C / icu4c-without-collation-rule-strings (push) Has been cancelled
GHA ICU4C / icu4c-uconfig-no-conversion (push) Has been cancelled
GHA ICU4C / icu4c-icuexportdata (push) Has been cancelled
GHA ICU4J / icu4j-mvn-init-cache (push) Has been cancelled
ICU Common / copyright-scan (push) Has been cancelled
ICU Common / valid-UTF-8-and-no-BOM-check (push) Has been cancelled
ICU Common / icu4j-mvn-init-cache (push) Has been cancelled
GHA ICU Merge CI / icu4j-mvn-init-cache (push) Has been cancelled
GHA ICU Merge CI / icu4c-store-perf-libs (push) Has been cancelled
GHA ICU Merge CI / icu4c-windows-msvc-postmerge (x64, Debug, x64) (push) Has been cancelled
GHA ICU Merge CI / icu4c-windows-msvc-postmerge (x64, Release, x64) (push) Has been cancelled
GHA ICU Merge CI / icu4c-windows-msvc-postmerge (x86, Debug, Win32) (push) Has been cancelled
GHA ICU Merge CI / icu4c-windows-msvc-postmerge (x86, Release, Win32) (push) Has been cancelled
GHA ICU Merge CI / icu4c-windows-cygwin-gcc (push) Has been cancelled
GHA CI Valgrind / clang-valgrind-test (push) Has been cancelled
GHA CI Valgrind / clang-valgrind-intltest (bidi) (push) Has been cancelled
GHA CI Valgrind / clang-valgrind-intltest (collator) (push) Has been cancelled
GHA CI Valgrind / clang-valgrind-intltest (convert) (push) Has been cancelled
GHA CI Valgrind / clang-valgrind-intltest (csdet) (push) Has been cancelled
GHA CI Valgrind / clang-valgrind-intltest (format) (push) Has been cancelled
GHA CI Valgrind / clang-valgrind-intltest (icuserv) (push) Has been cancelled
GHA CI Valgrind / clang-valgrind-intltest (idna) (push) Has been cancelled
GHA CI Valgrind / clang-valgrind-intltest (normalize) (push) Has been cancelled
GHA CI Valgrind / clang-valgrind-intltest (rbbi) (push) Has been cancelled
GHA CI Valgrind / clang-valgrind-intltest (rbnf) (push) Has been cancelled
GHA CI Valgrind / clang-valgrind-intltest (rbnfp) (push) Has been cancelled
GHA CI Valgrind / clang-valgrind-intltest (rbnfrt) (push) Has been cancelled
GHA CI Valgrind / clang-valgrind-intltest (regex) (push) Has been cancelled
GHA CI Valgrind / clang-valgrind-intltest (spoof) (push) Has been cancelled
GHA CI Valgrind / clang-valgrind-intltest (translit) (push) Has been cancelled
GHA CI Valgrind / clang-valgrind-intltest (utility) (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
GHA ICU4J / icu4j-mvn-build-and-test (11) (push) Has been cancelled
GHA ICU4J / icu4j-mvn-build-and-test (17) (push) Has been cancelled
GHA ICU4J / icu4j-mvn-build-and-test (21) (push) Has been cancelled
GHA ICU4J / lstm-icu4j-build-and-test (push) Has been cancelled
GHA ICU4J / adaboost-icu4j-build-and-test (push) Has been cancelled
ICU Common / icu4c-release-tools (push) Has been cancelled
GHA ICU Merge CI / icu4j-little-endian-data-test (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests (-f ../../icu4j/perf-tests/data/conversion/xuzhimo.txt, -e gb18030, utfperf, Roundtrip FromUnicode FromUTF8) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests (charperf, TestIsAlpha TestIsUpper TestIsLower TestIsDigit TestIsSpace TestIsAlphaNumeric TestIsPrint TestIsControl TestToLower TestToUpper TestIsWhiteSpace) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests (usetperf, titlecase_letter_add titlecase_letter_contains titlecase_letter_iterator unassigned_add unassigned_contains unassigned_iterator pattern1 pattern2 pattern3) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (TestNames_Asian, -l -u, ustrperf, TestCtor TestCtor1 TestCtor2 TestCtor3 TestAssign TestAssign1 TestAssign2 TestGetch TestCatenate TestScan TestScan1 TestScan2) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (TestNames_Asian, collperf, TestIcu_KeyGen_null TestIcu_qsort_strcoll_null TestIcu_qsort_usekey TestIcu_BinarySearch_strcoll_null TestIcu_BinarySearch_usekey) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (TestNames_Asian, normperf, TestICU_NFC_NFD_Text TestICU_NFC_NFC_Text TestICU_NFC_Orig_Text TestICU_NFD_NFD_Text TestICU_NFD_NFC_Text TestICU_NFD_Orig_Text) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (TestNames_Chinese, -l -u, ustrperf, TestCtor TestCtor1 TestCtor2 TestCtor3 TestAssign TestAssign1 TestAssign2 TestGetch TestCatenate TestScan TestScan1 TestScan2) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (TestNames_Chinese, collperf, TestIcu_KeyGen_null TestIcu_qsort_strcoll_null TestIcu_qsort_usekey TestIcu_BinarySearch_strcoll_null TestIcu_BinarySearch_usekey) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (TestNames_Chinese, normperf, TestICU_NFC_NFD_Text TestICU_NFC_NFC_Text TestICU_NFC_Orig_Text TestICU_NFD_NFD_Text TestICU_NFD_NFC_Text TestICU_NFD_Orig_Text) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (TestNames_Japanese, collperf, TestIcu_KeyGen_null TestIcu_qsort_strcoll_null TestIcu_qsort_usekey TestIcu_BinarySearch_strcoll_null TestIcu_BinarySearch_usekey) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (TestNames_Japanese, normperf, TestICU_NFC_NFD_Text TestICU_NFC_NFC_Text TestICU_NFC_Orig_Text TestICU_NFD_NFD_Text TestICU_NFD_NFC_Text TestICU_NFD_Orig_Text) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (TestNames_Japanese_h, -l -u, ustrperf, TestCtor TestCtor1 TestCtor2 TestCtor3 TestAssign TestAssign1 TestAssign2 TestGetch TestCatenate TestScan TestScan1 TestScan2) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (TestNames_Japanese_h, collperf, TestIcu_KeyGen_null TestIcu_qsort_strcoll_null TestIcu_qsort_usekey TestIcu_BinarySearch_strcoll_null TestIcu_BinarySearch_usekey) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (TestNames_Japanese_h, normperf, TestICU_NFC_NFD_Text TestICU_NFC_NFC_Text TestICU_NFC_Orig_Text TestICU_NFD_NFD_Text TestICU_NFD_NFC_Text TestICU_NFD_Orig_Text) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (TestNames_Japanese_k, -l -u, ustrperf, TestCtor TestCtor1 TestCtor2 TestCtor3 TestAssign TestAssign1 TestAssign2 TestGetch TestCatenate TestScan TestScan1 TestScan2) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (TestNames_Japanese_k, collperf, TestIcu_KeyGen_null TestIcu_qsort_strcoll_null TestIcu_qsort_usekey TestIcu_BinarySearch_strcoll_null TestIcu_BinarySearch_usekey) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (TestNames_Japanese_k, normperf, TestICU_NFC_NFD_Text TestICU_NFC_NFC_Text TestICU_NFC_Orig_Text TestICU_NFD_NFD_Text TestICU_NFD_NFC_Text TestICU_NFD_Orig_Text) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (TestNames_Korean, -l -u, ustrperf, TestCtor TestCtor1 TestCtor2 TestCtor3 TestAssign TestAssign1 TestAssign2 TestGetch TestCatenate TestScan TestScan1 TestScan2) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (TestNames_Korean, collperf, TestIcu_KeyGen_null TestIcu_qsort_strcoll_null TestIcu_qsort_usekey TestIcu_BinarySearch_strcoll_null TestIcu_BinarySearch_usekey) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (TestNames_Korean, normperf, TestICU_NFC_NFD_Text TestICU_NFC_NFC_Text TestICU_NFC_Orig_Text TestICU_NFD_NFD_Text TestICU_NFD_NFC_Text TestICU_NFD_Orig_Text) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (TestNames_Latin, -l -u, ustrperf, TestCtor TestCtor1 TestCtor2 TestCtor3 TestAssign TestAssign1 TestAssign2 TestGetch TestCatenate TestScan TestScan1 TestScan2) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (TestNames_Latin, collperf, TestIcu_KeyGen_null TestIcu_qsort_strcoll_null TestIcu_qsort_usekey TestIcu_BinarySearch_strcoll_null TestIcu_BinarySearch_usekey) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (TestNames_Latin, normperf, TestICU_NFC_NFD_Text TestICU_NFC_NFC_Text TestICU_NFC_Orig_Text TestICU_NFD_NFD_Text TestICU_NFD_NFC_Text TestICU_NFD_Orig_Text) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (TestNames_Russian, -l -u, ustrperf, TestCtor TestCtor1 TestCtor2 TestCtor3 TestAssign TestAssign1 TestAssign2 TestGetch TestCatenate TestScan TestScan1 TestScan2) (push) Has been cancelled
GHA ICU Merge CI / icu4c-strsrchperf (udhr_deu_1996, de) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (TestNames_Russian, collperf, TestIcu_KeyGen_null TestIcu_qsort_strcoll_null TestIcu_qsort_usekey TestIcu_BinarySearch_strcoll_null TestIcu_BinarySearch_usekey) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (TestNames_Russian, normperf, TestICU_NFC_NFD_Text TestICU_NFC_NFC_Text TestICU_NFC_Orig_Text TestICU_NFD_NFD_Text TestICU_NFD_NFC_Text TestICU_NFD_Orig_Text) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (TestNames_SerbianSH, -l -u, ustrperf, TestCtor TestCtor1 TestCtor2 TestCtor3 TestAssign TestAssign1 TestAssign2 TestGetch TestCatenate TestScan TestScan1 TestScan2) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (TestNames_SerbianSH, collperf, TestIcu_KeyGen_null TestIcu_qsort_strcoll_null TestIcu_qsort_usekey TestIcu_BinarySearch_strcoll_null TestIcu_BinarySearch_usekey) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (TestNames_SerbianSH, normperf, TestICU_NFC_NFD_Text TestICU_NFC_NFC_Text TestICU_NFC_Orig_Text TestICU_NFD_NFD_Text TestICU_NFD_NFC_Text TestICU_NFD_Orig_Text) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (TestNames_SerbianSR, -l -u, ustrperf, TestCtor TestCtor1 TestCtor2 TestCtor3 TestAssign TestAssign1 TestAssign2 TestGetch TestCatenate TestScan TestScan1 TestScan2) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (TestNames_SerbianSR, collperf, TestIcu_KeyGen_null TestIcu_qsort_strcoll_null TestIcu_qsort_usekey TestIcu_BinarySearch_strcoll_null TestIcu_BinarySearch_usekey) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (TestNames_SerbianSR, normperf, TestICU_NFC_NFD_Text TestICU_NFC_NFC_Text TestICU_NFC_Orig_Text TestICU_NFD_NFD_Text TestICU_NFD_NFC_Text TestICU_NFD_Orig_Text) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (TestNames_Simplified_Chinese, -l -u, ustrperf, TestCtor TestCtor1 TestCtor2 TestCtor3 TestAssign TestAssign1 TestAssign2 TestGetch TestCatenate TestScan TestScan1 TestScan2) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (TestNames_Simplified_Chinese, collperf, TestIcu_KeyGen_null TestIcu_qsort_strcoll_null TestIcu_qsort_usekey TestIcu_BinarySearch_strcoll_null TestIcu_BinarySearch_usekey) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (TestNames_Thai, -l -u, ustrperf, TestCtor TestCtor1 TestCtor2 TestCtor3 TestAssign TestAssign1 TestAssign2 TestGetch TestCatenate TestScan TestScan1 TestScan2) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (TestNames_Thai, collperf, TestIcu_KeyGen_null TestIcu_qsort_strcoll_null TestIcu_qsort_usekey TestIcu_BinarySearch_strcoll_null TestIcu_BinarySearch_usekey) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (TestNames_Thai, normperf, TestICU_NFC_NFD_Text TestICU_NFC_NFC_Text TestICU_NFC_Orig_Text TestICU_NFD_NFD_Text TestICU_NFD_NFC_Text TestICU_NFD_Orig_Text) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (th18057, -l -u, ustrperf, TestCtor TestCtor1 TestCtor2 TestCtor3 TestAssign TestAssign1 TestAssign2 TestGetch TestCatenate TestScan TestScan1 TestScan2) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (th18057, normperf, TestICU_NFC_NFD_Text TestICU_NFC_NFC_Text TestICU_NFC_Orig_Text TestICU_NFD_NFD_Text TestICU_NFD_NFC_Text TestICU_NFD_Orig_Text) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (thesis, normperf, TestICU_NFC_NFD_Text TestICU_NFC_NFC_Text TestICU_NFC_Orig_Text TestICU_NFD_NFD_Text TestICU_NFD_NFC_Text TestICU_NFD_Orig_Text) (push) Has been cancelled
GHA ICU Merge CI / icu4c-performance-tests-with-files (vfear11a, normperf, TestICU_NFC_NFD_Text TestICU_NFC_NFC_Text TestICU_NFC_Orig_Text TestICU_NFD_NFD_Text TestICU_NFD_NFC_Text TestICU_NFD_Orig_Text) (push) Has been cancelled
GHA ICU Merge CI / icu4c-strsrchperf (udhr_cmn_hans, zh) (push) Has been cancelled
GHA ICU Merge CI / icu4c-strsrchperf (udhr_eng, en) (push) Has been cancelled
GHA ICU Merge CI / icu4c-strsrchperf (udhr_fra, fr) (push) Has been cancelled
GHA ICU Merge CI / icu4c-strsrchperf (udhr_jpn, ja) (push) Has been cancelled
GHA ICU Merge CI / icu4c-strsrchperf (udhr_rus, ru) (push) Has been cancelled
GHA ICU Merge CI / icu4c-strsrchperf (udhr_tha, th) (push) Has been cancelled
GHA ICU Merge CI / icu4j-unicodesetperf (UnicodeSetAdd) (push) Has been cancelled
GHA ICU Merge CI / icu4j-unicodesetperf (UnicodeSetContains) (push) Has been cancelled
GHA ICU Merge CI / icu4j-unicodesetperf (UnicodeSetIterate) (push) Has been cancelled
GHA ICU Merge CI / icu4j-ucharacterperf (push) Has been cancelled
GHA ICU Merge CI / icu4j-decimalformatperf (de_DE, TestICUConstruction) (push) Has been cancelled
GHA ICU Merge CI / icu4j-decimalformatperf (de_DE, TestICUFormat) (push) Has been cancelled
GHA ICU Merge CI / icu4j-decimalformatperf (de_DE, TestICUParse) (push) Has been cancelled
GHA ICU Merge CI / icu4j-decimalformatperf (en_US, TestICUConstruction) (push) Has been cancelled
GHA ICU Merge CI / icu4j-decimalformatperf (en_US, TestICUFormat) (push) Has been cancelled
GHA ICU Merge CI / icu4j-decimalformatperf (en_US, TestICUParse) (push) Has been cancelled
GHA ICU Merge CI / icu4j-normperf (-l, TestICU_NFC_NFC_Text, TestNames_Asian) (push) Has been cancelled
GHA ICU Merge CI / icu4j-normperf (-l, TestICU_NFC_NFC_Text, TestNames_Chinese) (push) Has been cancelled
GHA ICU Merge CI / icu4j-normperf (-l, TestICU_NFC_NFC_Text, TestNames_SerbianSH) (push) Has been cancelled
GHA ICU Merge CI / icu4j-normperf (-l, TestICU_NFC_Orig_Text, TestNames_Asian) (push) Has been cancelled
GHA ICU Merge CI / icu4j-normperf (-l, TestICU_NFC_Orig_Text, TestNames_Chinese) (push) Has been cancelled
GHA ICU Merge CI / icu4j-normperf (-l, TestICU_NFC_Orig_Text, TestNames_SerbianSH) (push) Has been cancelled
GHA ICU Merge CI / icu4j-normperf (-l, TestICU_NFD_NFC_Text, TestNames_Asian) (push) Has been cancelled
GHA ICU Merge CI / icu4j-normperf (-l, TestICU_NFD_NFC_Text, TestNames_Chinese) (push) Has been cancelled
GHA ICU Merge CI / icu4j-normperf (-l, TestICU_NFD_NFC_Text, TestNames_SerbianSH) (push) Has been cancelled
GHA ICU Merge CI / icu4j-normperf (-l, TestICU_NFD_NFD_Text, TestNames_Asian) (push) Has been cancelled
GHA ICU Merge CI / icu4j-normperf (-l, TestICU_NFD_NFD_Text, TestNames_Chinese) (push) Has been cancelled
GHA ICU Merge CI / icu4j-normperf (-l, TestICU_NFD_NFD_Text, TestNames_SerbianSH) (push) Has been cancelled
GHA ICU Merge CI / icu4j-normperf (-l, TestICU_NFD_Orig_Text, TestNames_Asian) (push) Has been cancelled
GHA ICU Merge CI / icu4j-normperf (-l, TestICU_NFD_Orig_Text, TestNames_Chinese) (push) Has been cancelled
GHA ICU Merge CI / icu4j-normperf (-l, TestICU_NFD_Orig_Text, TestNames_SerbianSH) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetDecoderICU, arabic, UTF-8) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetDecoderICU, arabic, csisolatinarabic) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetDecoderICU, english, US-ASCII) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetDecoderICU, english, UTF-8) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetDecoderICU, french, UTF-16BE) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetDecoderICU, french, UTF-16LE) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetDecoderICU, french, UTF-8) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetDecoderICU, french, csisolatin1) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetDecoderICU, greek, UTF-8) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetDecoderICU, greek, csisolatingreek) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetDecoderICU, hebrew, UTF-8) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetDecoderICU, hebrew, csisolatinhebrew) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetDecoderICU, hindi, UTF-8) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetDecoderICU, japanese, EUC-JP) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetDecoderICU, japanese, UTF-8) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetDecoderICU, japanese, csiso2022jp) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetDecoderICU, korean, UTF-8) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetDecoderICU, korean, csiso2022kr) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetDecoderICU, s-chinese, EUC-CN) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetDecoderICU, s-chinese, UTF-8) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetEncoderICU, arabic, UTF-8) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetEncoderICU, arabic, csisolatinarabic) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetEncoderICU, english, US-ASCII) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetEncoderICU, english, UTF-8) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetEncoderICU, french, UTF-16BE) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetEncoderICU, french, UTF-16LE) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetEncoderICU, french, UTF-8) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetEncoderICU, french, csisolatin1) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetEncoderICU, greek, UTF-8) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetEncoderICU, greek, csisolatingreek) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetEncoderICU, hebrew, UTF-8) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetEncoderICU, hebrew, csisolatinhebrew) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetEncoderICU, hindi, UTF-8) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetEncoderICU, japanese, EUC-JP) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetEncoderICU, japanese, UTF-8) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetEncoderICU, japanese, csiso2022jp) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetEncoderICU, korean, UTF-8) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetEncoderICU, korean, csiso2022kr) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetEncoderICU, s-chinese, EUC-CN) (push) Has been cancelled
GHA ICU Merge CI / icu4j-converterperf (TestCharsetEncoderICU, s-chinese, UTF-8) (push) Has been cancelled
GHA ICU Merge CI / icu4j-dateformatperf (en_US, "HH:mm Z" "13:13 -0800" 5, TestICUConstruction) (push) Has been cancelled
GHA ICU Merge CI / icu4j-dateformatperf (en_US, "HH:mm Z" "13:13 -0800" 5, TestICUFormat) (push) Has been cancelled
GHA ICU Merge CI / icu4j-dateformatperf (en_US, "HH:mm Z" "13:13 -0800" 5, TestICUParse) (push) Has been cancelled
GHA ICU Merge CI / icu4j-dateformatperf (en_US, "HH:mm z" "13:13 PST" 4, TestICUConstruction) (push) Has been cancelled
GHA ICU Merge CI / icu4j-dateformatperf (en_US, "HH:mm z" "13:13 PST" 4, TestICUFormat) (push) Has been cancelled
GHA ICU Merge CI / icu4j-dateformatperf (en_US, "HH:mm z" "13:13 PST" 4, TestICUParse) (push) Has been cancelled
GHA ICU Merge CI / icu4j-dateformatperf (en_US, "HH:mm zzzz" "13:13 Pacific Standard Time" 3, TestICUConstruction) (push) Has been cancelled
GHA ICU Merge CI / icu4j-dateformatperf (en_US, "HH:mm zzzz" "13:13 Pacific Standard Time" 3, TestICUFormat) (push) Has been cancelled
GHA ICU Merge CI / icu4j-dateformatperf (en_US, "HH:mm zzzz" "13:13 Pacific Standard Time" 3, TestICUParse) (push) Has been cancelled
GHA ICU Merge CI / icu4j-dateformatperf (en_US, "HH:mm" "13:13" 2, TestICUConstruction) (push) Has been cancelled
GHA ICU Merge CI / icu4j-dateformatperf (en_US, "HH:mm" "13:13" 2, TestICUFormat) (push) Has been cancelled
GHA ICU Merge CI / icu4j-dateformatperf (en_US, "HH:mm" "13:13" 2, TestICUParse) (push) Has been cancelled
GHA ICU Merge CI / icu4j-dateformatperf (en_US, "dddd MMM yyyy" "15 Jan 2007" 1, TestICUConstruction) (push) Has been cancelled
GHA ICU Merge CI / icu4j-dateformatperf (en_US, "dddd MMM yyyy" "15 Jan 2007" 1, TestICUFormat) (push) Has been cancelled
GHA ICU Merge CI / icu4j-dateformatperf (en_US, "dddd MMM yyyy" "15 Jan 2007" 1, TestICUParse) (push) Has been cancelled
GHA ICU Merge CI / icu4j-dateformatperf (sw_KE, "dddd MMM yyyy" "15 Jan 2007" 1, TestICUConstruction) (push) Has been cancelled
GHA ICU Merge CI / icu4j-dateformatperf (sw_KE, "dddd MMM yyyy" "15 Jan 2007" 1, TestICUFormat) (push) Has been cancelled
GHA ICU Merge CI / icu4j-dateformatperf (sw_KE, "dddd MMM yyyy" "15 Jan 2007" 1, TestICUParse) (push) Has been cancelled
GHA ICU Merge CI / Copy perf data to remote repo for visualization (push) Has been cancelled

See #3470
This commit is contained in:
Frank Tang 2025-04-17 21:28:40 +00:00 committed by Frank Yung-Fong Tang
parent b092784912
commit 1c1533bf15
24 changed files with 233 additions and 398 deletions

View file

@ -1236,16 +1236,31 @@ Calendar::set(int32_t year, int32_t month, int32_t date, int32_t hour, int32_t m
// -------------------------------------
int32_t Calendar::getRelatedYear(UErrorCode &status) const
{
return get(UCAL_EXTENDED_YEAR, status);
int32_t year = get(UCAL_EXTENDED_YEAR, status);
if (U_FAILURE(status)) {
return 0;
}
if (uprv_add32_overflow(year, getRelatedYearDifference(), &year)) {
status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
return year;
}
// -------------------------------------
void Calendar::setRelatedYear(int32_t year)
{
// set extended year
if (uprv_add32_overflow(year, -getRelatedYearDifference(), &year)) {
return;
}
set(UCAL_EXTENDED_YEAR, year);
}
int32_t Calendar::getRelatedYearDifference() const {
return 0;
}
// -------------------------------------
void

View file

@ -1074,25 +1074,8 @@ void ChineseCalendar::offsetMonth(int32_t newMoon, int32_t dayOfMonth, int32_t d
}
}
constexpr uint32_t kChineseRelatedYearDiff = -2637;
int32_t ChineseCalendar::getRelatedYear(UErrorCode &status) const
{
int32_t year = get(UCAL_EXTENDED_YEAR, status);
if (U_FAILURE(status)) {
return 0;
}
if (uprv_add32_overflow(year, kChineseRelatedYearDiff, &year)) {
status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
return year;
}
void ChineseCalendar::setRelatedYear(int32_t year)
{
// set extended year
set(UCAL_EXTENDED_YEAR, year - kChineseRelatedYearDiff);
int32_t ChineseCalendar::getRelatedYearDifference() const {
return CHINESE_EPOCH_YEAR - 1;
}
IMPL_SYSTEM_DEFAULT_CENTURY(ChineseCalendar, "@calendar=chinese")

View file

@ -204,19 +204,11 @@ class U_I18N_API ChineseCalendar : public Calendar {
virtual void roll(UCalendarDateFields field, int32_t amount, UErrorCode &status) override;
virtual void roll(EDateFields field, int32_t amount, UErrorCode &status) override;
protected:
/**
* @return The related Gregorian year; will be obtained by modifying the value
* obtained by get from UCAL_EXTENDED_YEAR field
* @internal
*/
virtual int32_t getRelatedYear(UErrorCode &status) const override;
/**
* @param year The related Gregorian year to set; will be modified as necessary then
* set in UCAL_EXTENDED_YEAR field
* @internal
*/
virtual void setRelatedYear(int32_t year) override;
int32_t getRelatedYearDifference() const override;
//----------------------------------------------------------------------
// Internal methods & astronomical calculations

View file

@ -102,23 +102,6 @@ CopticCalendar::handleComputeFields(int32_t julianDay, UErrorCode& status)
internalSet(UCAL_DAY_OF_YEAR, (30 * month) + day);
}
constexpr uint32_t kCopticRelatedYearDiff = 284;
int32_t CopticCalendar::getRelatedYear(UErrorCode &status) const
{
int32_t year = get(UCAL_EXTENDED_YEAR, status);
if (U_FAILURE(status)) {
return 0;
}
return year + kCopticRelatedYearDiff;
}
void CopticCalendar::setRelatedYear(int32_t year)
{
// set extended year
set(UCAL_EXTENDED_YEAR, year - kCopticRelatedYearDiff);
}
IMPL_SYSTEM_DEFAULT_CENTURY(CopticCalendar, "@calendar=coptic")
int32_t
@ -127,6 +110,12 @@ CopticCalendar::getJDEpochOffset() const
return COPTIC_JD_EPOCH_OFFSET;
}
int32_t
CopticCalendar::getRelatedYearDifference() const {
constexpr int32_t kCopticCalendarRelatedYearDifference = 284;
return kCopticCalendarRelatedYearDifference;
}
U_NAMESPACE_END

View file

@ -154,25 +154,16 @@ public:
*/
const char * getType() const override;
/**
* @return The related Gregorian year; will be obtained by modifying the value
* obtained by get from UCAL_EXTENDED_YEAR field
* @internal
*/
virtual int32_t getRelatedYear(UErrorCode &status) const override;
/**
* @param year The related Gregorian year to set; will be modified as necessary then
* set in UCAL_EXTENDED_YEAR field
* @internal
*/
virtual void setRelatedYear(int32_t year) override;
protected:
//-------------------------------------------------------------------------
// Calendar framework
//-------------------------------------------------------------------------
/**
* @internal
*/
int32_t getRelatedYearDifference() const override;
/**
* Return the extended year defined by the current fields.
* @internal

View file

@ -158,25 +158,8 @@ const TimeZone* getAstronomerTimeZone(UErrorCode &status) {
return gAstronomerTimeZone;
}
constexpr uint32_t kDangiRelatedYearDiff = -2333;
int32_t DangiCalendar::getRelatedYear(UErrorCode &status) const
{
int32_t year = get(UCAL_EXTENDED_YEAR, status);
if (U_FAILURE(status)) {
return 0;
}
if (uprv_add32_overflow(year, kDangiRelatedYearDiff, &year)) {
status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
return year;
}
void DangiCalendar::setRelatedYear(int32_t year)
{
// set extended year
set(UCAL_EXTENDED_YEAR, year - kDangiRelatedYearDiff);
int32_t DangiCalendar::getRelatedYearDifference() const {
return DANGI_EPOCH_YEAR - 1;
}
ChineseCalendar::Setting DangiCalendar::getSetting(UErrorCode& status) const {

View file

@ -68,24 +68,6 @@ class DangiCalendar : public ChineseCalendar {
*/
virtual DangiCalendar* clone() const override;
//----------------------------------------------------------------------
// Internal methods & astronomical calculations
//----------------------------------------------------------------------
/**
* @return The related Gregorian year; will be obtained by modifying the value
* obtained by get from UCAL_EXTENDED_YEAR field
* @internal
*/
virtual int32_t getRelatedYear(UErrorCode &status) const override;
/**
* @param year The related Gregorian year to set; will be modified as necessary then
* set in UCAL_EXTENDED_YEAR field
* @internal
*/
virtual void setRelatedYear(int32_t year) override;
private:
// UObject stuff
@ -121,6 +103,11 @@ class DangiCalendar : public ChineseCalendar {
protected:
virtual Setting getSetting(UErrorCode& status) const override;
/*
* @internal
*/
int32_t getRelatedYearDifference() const override;
private:
DangiCalendar(); // default constructor not implemented

View file

@ -95,23 +95,6 @@ EthiopicCalendar::handleComputeFields(int32_t julianDay, UErrorCode& status)
internalSet(UCAL_DAY_OF_YEAR, (30 * month) + day);
}
constexpr uint32_t kEthiopicRelatedYearDiff = 8;
int32_t EthiopicCalendar::getRelatedYear(UErrorCode &status) const
{
int32_t year = get(UCAL_EXTENDED_YEAR, status);
if (U_FAILURE(status)) {
return 0;
}
return year + kEthiopicRelatedYearDiff;
}
void EthiopicCalendar::setRelatedYear(int32_t year)
{
// set extended year
set(UCAL_EXTENDED_YEAR, year - kEthiopicRelatedYearDiff);
}
IMPL_SYSTEM_DEFAULT_CENTURY(EthiopicCalendar, "@calendar=ethiopic")
int32_t
@ -121,6 +104,11 @@ EthiopicCalendar::getJDEpochOffset() const
}
int32_t EthiopicCalendar::getRelatedYearDifference() const {
constexpr int32_t kEthiopicCalendarRelatedYearDifference = 8;
return kEthiopicCalendarRelatedYearDifference;
}
//-------------------------------------------------------------------------
// Constructors...
//-------------------------------------------------------------------------
@ -188,29 +176,17 @@ EthiopicAmeteAlemCalendar::handleGetLimit(UCalendarDateFields field, ELimitType
return EthiopicCalendar::handleGetLimit(field, limitType);
}
constexpr uint32_t kEthiopicAmeteAlemRelatedYearDiff = -5492;
int32_t EthiopicAmeteAlemCalendar::getRelatedYear(UErrorCode &status) const
{
int32_t year = get(UCAL_EXTENDED_YEAR, status);
if (U_FAILURE(status)) {
return 0;
}
return year + kEthiopicAmeteAlemRelatedYearDiff;
}
void EthiopicAmeteAlemCalendar::setRelatedYear(int32_t year)
{
// set extended year
set(UCAL_EXTENDED_YEAR, year - kEthiopicAmeteAlemRelatedYearDiff);
}
int32_t
EthiopicAmeteAlemCalendar::defaultCenturyStartYear() const
{
return EthiopicCalendar::defaultCenturyStartYear() + AMETE_MIHRET_DELTA;
}
int32_t EthiopicAmeteAlemCalendar::getRelatedYearDifference() const {
constexpr int32_t kEthiopicAmeteAlemCalendarRelatedYearDifference = -5492;
return kEthiopicAmeteAlemCalendarRelatedYearDifference;
}
U_NAMESPACE_END
#endif

View file

@ -141,25 +141,16 @@ public:
*/
virtual const char * getType() const override;
/**
* @return The related Gregorian year; will be obtained by modifying the value
* obtained by get from UCAL_EXTENDED_YEAR field
* @internal
*/
virtual int32_t getRelatedYear(UErrorCode &status) const override;
/**
* @param year The related Gregorian year to set; will be modified as necessary then
* set in UCAL_EXTENDED_YEAR field
* @internal
*/
virtual void setRelatedYear(int32_t year) override;
protected:
//-------------------------------------------------------------------------
// Calendar framework
//-------------------------------------------------------------------------
/**
* @internal
*/
int32_t getRelatedYearDifference() const override;
/**
* Return the extended year defined by the current fields.
* This calendar uses both AMETE_ALEM and AMETE_MIHRET.
@ -302,25 +293,16 @@ public:
*/
U_I18N_API static UClassID U_EXPORT2 getStaticClassID();
/**
* @return The related Gregorian year; will be obtained by modifying the value
* obtained by get from UCAL_EXTENDED_YEAR field
* @internal
*/
virtual int32_t getRelatedYear(UErrorCode &status) const override;
/**
* @param year The related Gregorian year to set; will be modified as necessary then
* set in UCAL_EXTENDED_YEAR field
* @internal
*/
virtual void setRelatedYear(int32_t year) override;
protected:
//-------------------------------------------------------------------------
// Calendar framework
//-------------------------------------------------------------------------
/**
* @internal
*/
int32_t getRelatedYearDifference() const override;
/**
* Return the extended year defined by the current fields.
* This calendar use only AMETE_ALEM for the era.

View file

@ -790,23 +790,6 @@ int64_t HebrewCalendar::handleComputeMonthStart(
return day + 347997LL;
}
constexpr uint32_t kHebrewRelatedYearDiff = -3760;
int32_t HebrewCalendar::getRelatedYear(UErrorCode &status) const
{
int32_t year = get(UCAL_EXTENDED_YEAR, status);
if (U_FAILURE(status)) {
return 0;
}
return year + kHebrewRelatedYearDiff;
}
void HebrewCalendar::setRelatedYear(int32_t year)
{
// set extended year
set(UCAL_EXTENDED_YEAR, year - kHebrewRelatedYearDiff);
}
IMPL_SYSTEM_DEFAULT_CENTURY(HebrewCalendar, "@calendar=hebrew")
bool HebrewCalendar::inTemporalLeapYear(UErrorCode& status) const {
@ -872,6 +855,11 @@ int32_t HebrewCalendar::internalGetMonth(UErrorCode& status) const {
return Calendar::internalGetMonth(status);
}
int32_t HebrewCalendar::getRelatedYearDifference() const {
constexpr int32_t kHebrewCalendarRelatedYearDifference = -3760;
return kHebrewCalendarRelatedYearDifference;
}
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(HebrewCalendar)
U_NAMESPACE_END

View file

@ -273,21 +273,11 @@ public:
*/
static UBool isLeapYear(int32_t year) ;
/**
* @return The related Gregorian year; will be obtained by modifying the value
* obtained by get from UCAL_EXTENDED_YEAR field
* @internal
*/
virtual int32_t getRelatedYear(UErrorCode &status) const override;
/**
* @param year The related Gregorian year to set; will be modified as necessary then
* set in UCAL_EXTENDED_YEAR field
* @internal
*/
virtual void setRelatedYear(int32_t year) override;
protected:
/**
* @internal
*/
int32_t getRelatedYearDifference() const override;
/**
* Subclass API for defining limits of different types.

View file

@ -296,31 +296,15 @@ void IndianCalendar::handleComputeFields(int32_t julianDay, UErrorCode& status)
internalSet(UCAL_DAY_OF_YEAR, yday + 1); // yday is 0-based
}
constexpr uint32_t kIndianRelatedYearDiff = 79;
int32_t IndianCalendar::getRelatedYear(UErrorCode &status) const
{
int32_t year = get(UCAL_EXTENDED_YEAR, status);
if (U_FAILURE(status)) {
return 0;
}
if (uprv_add32_overflow(year, kIndianRelatedYearDiff, &year)) {
status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
return year;
}
void IndianCalendar::setRelatedYear(int32_t year)
{
// set extended year
set(UCAL_EXTENDED_YEAR, year - kIndianRelatedYearDiff);
}
IMPL_SYSTEM_DEFAULT_CENTURY(IndianCalendar, "@calendar=indian")
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(IndianCalendar)
int32_t IndianCalendar::getRelatedYearDifference() const {
constexpr int32_t kIndianCalendarRelatedYearDifference = 79;
return kIndianCalendarRelatedYearDifference;
}
U_NAMESPACE_END
#endif

View file

@ -284,27 +284,16 @@ public:
*/
virtual const char * getType() const override;
/**
* @return The related Gregorian year; will be obtained by modifying the value
* obtained by get from UCAL_EXTENDED_YEAR field
* @internal
*/
virtual int32_t getRelatedYear(UErrorCode &status) const override;
/**
* @param year The related Gregorian year to set; will be modified as necessary then
* set in UCAL_EXTENDED_YEAR field
* @internal
*/
virtual void setRelatedYear(int32_t year) override;
private:
IndianCalendar() = delete; // default constructor not implemented
// Default century.
protected:
/**
* @internal
*/
int32_t getRelatedYearDifference() const override;
// Default century.
DECLARE_OVERRIDE_SYSTEM_DEFAULT_CENTURY
};

View file

@ -319,30 +319,14 @@ void PersianCalendar::handleComputeFields(int32_t julianDay, UErrorCode& status)
internalSet(UCAL_DAY_OF_YEAR, dayOfYear);
}
constexpr uint32_t kPersianRelatedYearDiff = 622;
int32_t PersianCalendar::getRelatedYear(UErrorCode &status) const
{
int32_t year = get(UCAL_EXTENDED_YEAR, status);
if (U_FAILURE(status)) {
return 0;
}
if (uprv_add32_overflow(year, kPersianRelatedYearDiff, &year)) {
status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
return year;
}
void PersianCalendar::setRelatedYear(int32_t year)
{
// set extended year
set(UCAL_EXTENDED_YEAR, year - kPersianRelatedYearDiff);
}
IMPL_SYSTEM_DEFAULT_CENTURY(PersianCalendar, "@calendar=persian")
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(PersianCalendar)
int32_t
PersianCalendar::getRelatedYearDifference() const {
constexpr int32_t kPersianCalendarRelatedYearDifference = 622;
return kPersianCalendarRelatedYearDifference;
}
U_NAMESPACE_END

View file

@ -278,19 +278,11 @@ class PersianCalendar : public Calendar {
*/
virtual const char * getType() const override;
protected:
/**
* @return The related Gregorian year; will be obtained by modifying the value
* obtained by get from UCAL_EXTENDED_YEAR field
* @internal
*/
virtual int32_t getRelatedYear(UErrorCode &status) const override;
/**
* @param year The related Gregorian year to set; will be modified as necessary then
* set in UCAL_EXTENDED_YEAR field
* @internal
*/
virtual void setRelatedYear(int32_t year) override;
int32_t getRelatedYearDifference() const override;
private:
PersianCalendar(); // default constructor not implemented

View file

@ -1555,6 +1555,14 @@ protected:
* @internal
*/
virtual bool isEra0CountingBackward() const { return false; }
/**
* Related year difference.
* @return The difference in Related year.
* @internal
*/
virtual int32_t getRelatedYearDifference() const;
#endif /* U_HIDE_INTERNAL_API */
/**

View file

@ -2302,29 +2302,21 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
set(SECOND, second);
}
// -------------------------------------
// For now the full getRelatedYear implementation is here;
// per #10752 move the non-default implementation to subclasses
// (default implementation will do no year adjustment)
/**
* utility function for getRelatedYear
* @internal
* @deprecated This API is ICU internal only.
*/
private static int gregoYearFromIslamicStart(int year) {
// ad hoc conversion, improve under #10752
// rough est for now, ok for grego 1846-2138,
// otherwise occasionally wrong (for 3% of years)
int cycle, offset, shift = 0;
if (year >= 1397) {
cycle = (year - 1397) / 67;
offset = (year - 1397) % 67;
shift = 2*cycle + ((offset >= 33)? 1: 0);
} else {
cycle = (year - 1396) / 67 - 1;
offset = -(year - 1396) % 67;
shift = 2*cycle + ((offset <= 33)? 1: 0);
}
return year + 579 - shift;
@Deprecated
protected int getRelatedYearDifference() {
return 0;
}
/**
* @internal
* @deprecated This API is ICU internal only.
*/
@Deprecated
public int getRelatedYear() {
return get(EXTENDED_YEAR) + getRelatedYearDifference();
}
/**
@ -2332,123 +2324,8 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
* @deprecated This API is ICU internal only.
*/
@Deprecated
public final int getRelatedYear() {
int year = get(EXTENDED_YEAR);
CalType type = CalType.GREGORIAN;
String typeString = getType();
for (CalType testType : CalType.values()) {
if (typeString.equals(testType.getId())) {
type = testType;
break;
}
}
switch (type) {
case PERSIAN:
year += 622; break;
case HEBREW:
year -= 3760; break;
case CHINESE:
year -= 2637; break;
case INDIAN:
year += 79; break;
case COPTIC:
year += 284; break;
case ETHIOPIC:
year += 8; break;
case ETHIOPIC_AMETE_ALEM:
year -=5492; break;
case DANGI:
year -= 2333; break;
case ISLAMIC_CIVIL:
case ISLAMIC:
case ISLAMIC_UMALQURA:
case ISLAMIC_TBLA:
case ISLAMIC_RGSA:
year = gregoYearFromIslamicStart(year); break;
// case GREGORIAN:
// case JAPANESE:
// case BUDDHIST:
// case ROC:
// case ISO8601:
default:
// do nothing, EXTENDED_YEAR same as Gregorian
break;
}
return year;
}
// -------------------------------------
// For now the full setRelatedYear implementation is here;
// per #10752 move the non-default implementation to subclasses
// (default implementation will do no year adjustment)
/**
* utility function for setRelatedYear
*/
private static int firstIslamicStartYearFromGrego(int year) {
// ad hoc conversion, improve under #10752
// rough est for now, ok for grego 1846-2138,
// otherwise occasionally wrong (for 3% of years)
int cycle, offset, shift = 0;
if (year >= 1977) {
cycle = (year - 1977) / 65;
offset = (year - 1977) % 65;
shift = 2*cycle + ((offset >= 32)? 1: 0);
} else {
cycle = (year - 1976) / 65 - 1;
offset = -(year - 1976) % 65;
shift = 2*cycle + ((offset <= 32)? 1: 0);
}
return year - 579 + shift;
}
/**
* @internal
* @deprecated This API is ICU internal only.
*/
@Deprecated
public final void setRelatedYear(int year) {
CalType type = CalType.GREGORIAN;
String typeString = getType();
for (CalType testType : CalType.values()) {
if (typeString.equals(testType.getId())) {
type = testType;
break;
}
}
switch (type) {
case PERSIAN:
year -= 622; break;
case HEBREW:
year += 3760; break;
case CHINESE:
year += 2637; break;
case INDIAN:
year -= 79; break;
case COPTIC:
year -= 284; break;
case ETHIOPIC:
year -= 8; break;
case ETHIOPIC_AMETE_ALEM:
year +=5492; break;
case DANGI:
year += 2333; break;
case ISLAMIC_CIVIL:
case ISLAMIC:
case ISLAMIC_UMALQURA:
case ISLAMIC_TBLA:
case ISLAMIC_RGSA:
year = firstIslamicStartYearFromGrego(year); break;
// case GREGORIAN:
// case JAPANESE:
// case BUDDHIST:
// case ROC:
// case ISO8601:
default:
// do nothing, EXTENDED_YEAR same as Gregorian
break;
}
set(EXTENDED_YEAR, year);
public void setRelatedYear(int year) {
set(EXTENDED_YEAR, year - getRelatedYearDifference());
}
/**

View file

@ -1186,6 +1186,15 @@ public class ChineseCalendar extends Calendar {
}
/**
* @internal
* @deprecated This API is ICU internal only.
*/
@Deprecated
protected final int getRelatedYearDifference() {
return epochYear - 1;
}
/*
private static CalendarFactory factory;
public static CalendarFactory factory() {

View file

@ -335,5 +335,16 @@ public final class CopticCalendar extends CECalendar
public static int copticToJD(long year, int month, int date) {
return ceToJD(year, month, date, JD_EPOCH_OFFSET);
}
private static final int COPTIC_CALENDAR_RELATED_YEAR_DIFFERENCE = 284;
/**
* @internal
* @deprecated This API is ICU internal only.
*/
@Deprecated
protected final int getRelatedYearDifference() {
return COPTIC_CALENDAR_RELATED_YEAR_DIFFERENCE;
}
}

View file

@ -400,6 +400,22 @@ public final class EthiopicCalendar extends CECalendar
return ceToJD(year, month, date, JD_EPOCH_OFFSET_AMETE_MIHRET);
}
private static final int ETHIOPIC_AMETE_ALEM_CALENDAR_RELATED_YEAR_DIFFERENCE = -5492;
private static final int ETHIOPIC_CALENDAR_RELATED_YEAR_DIFFERENCE = 8;
/**
* @internal
* @deprecated This API is ICU internal only.
*/
@Deprecated
protected final int getRelatedYearDifference() {
return isAmeteAlemEra() ?
ETHIOPIC_AMETE_ALEM_CALENDAR_RELATED_YEAR_DIFFERENCE :
ETHIOPIC_CALENDAR_RELATED_YEAR_DIFFERENCE;
}
/**
* set type based on locale
*/

View file

@ -914,6 +914,17 @@ public class HebrewCalendar extends Calendar {
return "hebrew";
}
private static final int HEBREW_CALENDAR_RELATED_YEAR_DIFFERENCE = -3760;
/**
* @internal
* @deprecated This API is ICU internal only.
*/
@Deprecated
protected final int getRelatedYearDifference() {
return HEBREW_CALENDAR_RELATED_YEAR_DIFFERENCE;
}
//-------------------------------------------------------------------------
// Temporal Calendar API.
//-------------------------------------------------------------------------

View file

@ -499,7 +499,18 @@ public class IndianCalendar extends Calendar {
return jd;
}
private static final int INDIAN_CALENDAR_RELATED_YEAR_DIFFERENCE = 79;
/**
* @internal
* @deprecated This API is ICU internal only.
*/
@Deprecated
protected final int getRelatedYearDifference() {
return INDIAN_CALENDAR_RELATED_YEAR_DIFFERENCE;
}
/*
* The following function is not needed for basic calendar functioning.
* This routine converts a gregorian date to the corresponding Julian date"

View file

@ -1130,6 +1130,63 @@ public class IslamicCalendar extends Calendar {
civil = algorithm.isCivil();
}
/**
* utility function for getRelatedYear
*/
private static final int gregoYearFromIslamicStart(int year) {
// ad hoc conversion, improve under #10752
// rough est for now, ok for grego 1846-2138,
// otherwise occasionally wrong (for 3% of years)
int cycle, offset, shift = 0;
if (year >= 1397) {
cycle = (year - 1397) / 67;
offset = (year - 1397) % 67;
shift = 2*cycle + ((offset >= 33)? 1: 0);
} else {
cycle = (year - 1396) / 67 - 1;
offset = -(year - 1396) % 67;
shift = 2*cycle + ((offset <= 33)? 1: 0);
}
return year + 579 - shift;
}
/**
* @internal
* @deprecated This API is ICU internal only.
*/
@Deprecated
public final int getRelatedYear() {
return gregoYearFromIslamicStart(get(EXTENDED_YEAR));
}
/**
* utility function for setRelatedYear
*/
private static int firstIslamicStartYearFromGrego(int year) {
// ad hoc conversion, improve under #10752
// rough est for now, ok for grego 1846-2138,
// otherwise occasionally wrong (for 3% of years)
int cycle, offset, shift = 0;
if (year >= 1977) {
cycle = (year - 1977) / 65;
offset = (year - 1977) % 65;
shift = 2*cycle + ((offset >= 32)? 1: 0);
} else {
cycle = (year - 1976) / 65 - 1;
offset = -(year - 1976) % 65;
shift = 2*cycle + ((offset <= 32)? 1: 0);
}
return year - 579 + shift;
}
/*
* @deprecated This API is ICU internal only.
*/
@Deprecated
public final void setRelatedYear(int year) {
set(EXTENDED_YEAR, firstIslamicStartYearFromGrego(year));
}
/**
* gets the calculation type for this calendar.
*

View file

@ -489,6 +489,16 @@ public class PersianCalendar extends Calendar {
internalSet(DAY_OF_YEAR, dayOfYear);
}
private static final int PERSIAN_CALENDAR_RELATED_YEAR_DIFFERENCE = 622;
/**
* @internal
* @deprecated This API is ICU internal only.
*/
@Deprecated
protected final int getRelatedYearDifference() {
return PERSIAN_CALENDAR_RELATED_YEAR_DIFFERENCE;
}
/**
* {@inheritDoc}
*