diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /intl/icu-patches/bug-1838173-ICU-22412-start-time-iso8601.diff | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'intl/icu-patches/bug-1838173-ICU-22412-start-time-iso8601.diff')
-rw-r--r-- | intl/icu-patches/bug-1838173-ICU-22412-start-time-iso8601.diff | 47 |
1 files changed, 47 insertions, 0 deletions
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(); + } |