Function icu_calendar::week_of::simple_week_of

source ·
pub fn simple_week_of(
    first_weekday: IsoWeekday,
    day: u16,
    week_day: IsoWeekday,
) -> u16
Expand description

Computes & returns the week of given month or year according to a calendar with min_week_days = 1.

Does not know anything about the unit size (month or year), and will just assume the date falls within whatever unit that is being considered. In other words, this function returns strictly increasing values as day increases, unlike week_of() which is cyclic.

§Arguments

  • first_weekday: The first day of a week.
  • day: 1-based day of the month or year.
  • week_day: The weekday of day.