Skip to content

Commit 126c927

Browse files
iyzanasffc
authored andcommitted
fix: assert >= 14 on num days not given day (unicode-org#4986)
The assert was probably meant to ensure the complete year has at least 14 days, and not that the given day is at least the 14th day of the year Fixes: unicode-org#4977 (cherry picked from commit e83fd9b)
1 parent 599f336 commit 126c927

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/datetime/src/input.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ impl ExtractedDateTimeInput {
349349
"iso_weekday",
350350
))?;
351351
// We don't have any calendars with < 14 days per year, and it's unlikely we'll add one
352-
debug_assert!(day_of_year_info.day_of_year >= icu_calendar::week::MIN_UNIT_DAYS);
352+
debug_assert!(day_of_year_info.days_in_year >= icu_calendar::week::MIN_UNIT_DAYS);
353353
debug_assert!(day_of_year_info.days_in_prev_year >= icu_calendar::week::MIN_UNIT_DAYS);
354354
#[allow(clippy::unwrap_used)]
355355
let week_of = calculator

0 commit comments

Comments
 (0)