Skip to content

Commit

Permalink
fix: assert >= 14 on num days not current day
Browse files Browse the repository at this point in the history
  • Loading branch information
iyzana committed Jun 1, 2024
1 parent 77da96b commit fabe0a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/datetime/src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ impl ExtractedDateTimeInput {
"iso_weekday",
))?;
// We don't have any calendars with < 14 days per year, and it's unlikely we'll add one
debug_assert!(day_of_year_info.day_of_year >= icu_calendar::week::MIN_UNIT_DAYS);
debug_assert!(day_of_year_info.days_in_year >= icu_calendar::week::MIN_UNIT_DAYS);
debug_assert!(day_of_year_info.days_in_prev_year >= icu_calendar::week::MIN_UNIT_DAYS);
#[allow(clippy::unwrap_used)]
let week_of = calculator
Expand Down

0 comments on commit fabe0a5

Please sign in to comment.