From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- .../bug-1838173-ICU-22412-start-time-iso8601.diff | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 intl/icu-patches/bug-1838173-ICU-22412-start-time-iso8601.diff (limited to 'intl/icu-patches/bug-1838173-ICU-22412-start-time-iso8601.diff') diff --git a/intl/icu-patches/bug-1838173-ICU-22412-start-time-iso8601.diff b/intl/icu-patches/bug-1838173-ICU-22412-start-time-iso8601.diff new file mode 100644 index 0000000000..3338a72457 --- /dev/null +++ b/intl/icu-patches/bug-1838173-ICU-22412-start-time-iso8601.diff @@ -0,0 +1,47 @@ +# Allow to set the Gregorian change date for ISO8601 calendars. +# +# ICU bug: https://unicode-org.atlassian.net/browse/ICU-22412 + +diff --git a/intl/icu/source/i18n/ucal.cpp b/intl/icu/source/i18n/ucal.cpp +--- a/intl/icu/source/i18n/ucal.cpp ++++ b/intl/icu/source/i18n/ucal.cpp +@@ -22,10 +22,11 @@ + #include "unicode/ustring.h" + #include "unicode/strenum.h" + #include "unicode/localpointer.h" + #include "cmemory.h" + #include "cstring.h" ++#include "iso8601cal.h" + #include "ustrenum.h" + #include "uenumimp.h" + #include "ulist.h" + #include "ulocimp.h" + +@@ -305,11 +306,12 @@ ucal_setGregorianChange(UCalendar *cal, + // We normally don't check "this" pointers for nullptr, but this here avoids + // compiler-generated exception-throwing code in case cal == nullptr. + *pErrorCode = U_ILLEGAL_ARGUMENT_ERROR; + return; + } +- if(typeid(*cpp_cal) != typeid(GregorianCalendar)) { ++ if(typeid(*cpp_cal) != typeid(GregorianCalendar) && ++ typeid(*cpp_cal) != typeid(ISO8601Calendar)) { + *pErrorCode = U_UNSUPPORTED_ERROR; + return; + } + gregocal->setGregorianChange(date, *pErrorCode); + } +@@ -327,11 +329,12 @@ ucal_getGregorianChange(const UCalendar + // We normally don't check "this" pointers for nullptr, but this here avoids + // compiler-generated exception-throwing code in case cal == nullptr. + *pErrorCode = U_ILLEGAL_ARGUMENT_ERROR; + return (UDate)0; + } +- if(typeid(*cpp_cal) != typeid(GregorianCalendar)) { ++ if(typeid(*cpp_cal) != typeid(GregorianCalendar) && ++ typeid(*cpp_cal) != typeid(ISO8601Calendar)) { + *pErrorCode = U_UNSUPPORTED_ERROR; + return (UDate)0; + } + return gregocal->getGregorianChange(); + } -- cgit v1.2.3