mirror of
https://codeberg.org/guix/guix.git
synced 2026-01-25 03:55:08 -06:00
Suggested by Deltafire. * gnu/packages/patches/icu4c-icu-22132-fix-vtimezone.patch: Rename to... * gnu/packages/patches/icu4c-22132-standardize-vtzone-output.patch: ... this. * gnu/packages/patches/icu4c-20548-dateinterval-timezone.patch: New file. * gnu/packages/patches/icu4c-dayperiod-fractional-seconds.patch: New file. * gnu/packages/patches/icu4c-23069-rosh-hashanah-postponement.patch * gnu/packages/patches/icu4c-dtitvfmt-adopt-calendar.patch * gnu/packages/patches/icu4c-wasi-workaround.patch: New files. * gnu/packages/patches/icu4c-double-conversion.patch: New file. * gnu/local.mk (dist_patch_DATA): Update accordingly. * gnu/packages/icu4c.scm (icu4c-77) [source]: Apply patches. Fixes: #3166 Change-Id: I9ce64a81f763e5c9ff2940a2d844a0b44d2800a8
26 lines
1.4 KiB
Diff
26 lines
1.4 KiB
Diff
Retrieved from: <https://raw.githubusercontent.com/mozilla-firefox/firefox/refs/heads/main/intl/icu-patches/bug-1954138-ICU-23069-rosh-hashanah-postponement.diff>
|
|
|
|
diff --git a/source/i18n/hebrwcal.cpp b/source/i18n/hebrwcal.cpp
|
|
--- a/source/i18n/hebrwcal.cpp
|
|
+++ b/source/i18n/hebrwcal.cpp
|
|
@@ -441,19 +441,18 @@ int32_t startOfYear(int32_t year, UError
|
|
day = months * 29LL + frac / DAY_PARTS; // Whole # part of calculation
|
|
frac = frac % DAY_PARTS; // Time of day
|
|
|
|
int32_t wd = (day % 7); // Day of week (0 == Monday)
|
|
|
|
if (wd == 2 || wd == 4 || wd == 6) {
|
|
// If the 1st is on Sun, Wed, or Fri, postpone to the next day
|
|
day += 1;
|
|
- wd = (day % 7);
|
|
}
|
|
- if (wd == 1 && frac > 15*HOUR_PARTS+204 && !HebrewCalendar::isLeapYear(year) ) {
|
|
+ else if (wd == 1 && frac > 15*HOUR_PARTS+204 && !HebrewCalendar::isLeapYear(year) ) {
|
|
// If the new moon falls after 3:11:20am (15h204p from the previous noon)
|
|
// on a Tuesday and it is not a leap year, postpone by 2 days.
|
|
// This prevents 356-day years.
|
|
day += 2;
|
|
}
|
|
else if (wd == 0 && frac > 21*HOUR_PARTS+589 && HebrewCalendar::isLeapYear(year-1) ) {
|
|
// If the new moon falls after 9:32:43 1/3am (21h589p from yesterday noon)
|
|
// on a Monday and *last* year was a leap year, postpone by 1 day.
|