mirror of
https://codeberg.org/guix/guix.git
synced 2026-01-25 03:55:08 -06:00
* gnu/packages/icu4c.scm (icu4c-78): New variable. * gnu/local.mk (dist_patch_DATA): Add icu4c patches. * gnu/packages/patches/icu4c-78-double-conversion.patch: New file. * gnu/packages/patches/icu4c-bug-1706949-wasi-workaround.patch: New file. * gnu/packages/patches/icu4c-bug-1790071-ICU-22132-standardize-vtzone-output.patch: New file. * gnu/packages/patches/icu4c-bug-1856290-ICU-20548-dateinterval-timezone.patch: New file. * gnu/packages/patches/icu4c-bug-1954138-dtitvfmt-adopt-calendar.patch: New file. * gnu/packages/patches/icu4c-bug-1972781-chinese-based-calendar.patch: New file. * gnu/packages/patches/icu4c-bug-2000225-ICU-23264-increase-measure-unit-capacity.patch: New file. * gnu/packages/patches/icu4c-bug-2002735-ICU-23277-coptic-single-era.patch: New file. * gnu/packages/patches/icu4c-suppress-warnings.patch: New file.
25 lines
1.2 KiB
Diff
25 lines
1.2 KiB
Diff
diff --git a/source/i18n/smpdtfmt.cpp b/source/i18n/smpdtfmt.cpp
|
|
--- a/source/i18n/smpdtfmt.cpp
|
|
+++ b/source/i18n/smpdtfmt.cpp
|
|
@@ -1523,18 +1523,19 @@ SimpleDateFormat::subFormat(UnicodeStrin
|
|
}
|
|
|
|
switch (patternCharIndex) {
|
|
|
|
// for any "G" symbol, write out the appropriate era string
|
|
// "GGGG" is wide era name, "GGGGG" is narrow era name, anything else is abbreviated name
|
|
case UDAT_ERA_FIELD:
|
|
{
|
|
- if (typeid(cal) == typeid(ChineseCalendar) ||
|
|
- typeid(cal) == typeid(DangiCalendar)) {
|
|
+ const char* type = cal.getType();
|
|
+ if (strcmp(type, "chinese") == 0 ||
|
|
+ strcmp(type, "dangi") == 0) {
|
|
zeroPaddingNumber(currentNumberFormat,appendTo, value, 1, 9); // as in ICU4J
|
|
} else {
|
|
if (count == 5) {
|
|
_appendSymbol(appendTo, value, fSymbols->fNarrowEras, fSymbols->fNarrowErasCount);
|
|
capContextUsageType = DateFormatSymbols::kCapContextUsageEraNarrow;
|
|
} else if (count == 4) {
|
|
_appendSymbol(appendTo, value, fSymbols->fEraNames, fSymbols->fEraNamesCount);
|
|
capContextUsageType = DateFormatSymbols::kCapContextUsageEraWide;
|