pub fn from_isoywd_opt(year: i32, week: u32, weekday: Weekday) -> Option<NaiveDate> {
        let flags = YearFlags::from_year(year);
        let nweeks = flags.nisoweeks();
        if 1 <= week && week <= nweeks {
            // ordinal = week ordinal - delta
            let weekord = week * 7 + weekday as u32;
            let delta = flags.isoweek_delta();
            if weekord <= delta { // ordinal < 1, previous year
                let prevflags = YearFlags::from_year(year - 1);
                NaiveDate::from_of(year - 1, Of::new(weekord + prevflags.ndays() - delta,
                                                     prevflags))
            } else {
                let ordinal = weekord - delta;
                let ndays = flags.ndays();
                if ordinal <= ndays { // this year
                    NaiveDate::from_of(year, Of::new(ordinal, flags))
                } else { // ordinal > ndays, next year
                    let nextflags = YearFlags::from_year(year + 1);
                    NaiveDate::from_of(year + 1, Of::new(ordinal - ndays, nextflags))
                }
            }
        } else {
            None
        }
    }
/// Makes a new `NaiveDate` from ISO week date (year and week number) and day of the week (DOW).
/// This assumes the proleptic Gregorian calendar, with the year 0 being 1 BCE.
/// The resulting `NaiveDate` may have a different year from the input year.
///
/// Returns `None` on the out-of-range date and/or invalid week number.
Makes a new `NaiveDate` from ISO week date (year and week number) and day of the week (DOW).
This assumes the proleptic Gregorian calendar, with the year 0 being 1 BCE.
The resulting `NaiveDate` may have a different year from the input year.

Returns `None` on the out-of-range date and/or invalid week number.
Makes a new ` NaiveDate ` from ISO week date ( year and week number ) and day of the week ( DOW ) . This assumes the proleptic Gregorian calendar with the year 0 being 1 BCE . The resulting ` NaiveDate ` may have a different year from the input year . Returns ` None ` on the out - of - range date and / or invalid week number .
pub fn from_isoywd_opt(year: i32, week: u32, weekday: Weekday) -> Option<NaiveDate> {
        let flags = YearFlags::from_year(year);
        let nweeks = flags.nisoweeks();
        if 1 <= week && week <= nweeks {
            // ordinal = week ordinal - delta
            let weekord = week * 7 + weekday as u32;
            let delta = flags.isoweek_delta();
            if weekord <= delta { // ordinal < 1, previous year
                let prevflags = YearFlags::from_year(year - 1);
                NaiveDate::from_of(year - 1, Of::new(weekord + prevflags.ndays() - delta,
                                                     prevflags))
            } else {
                let ordinal = weekord - delta;
                let ndays = flags.ndays();
                if ordinal <= ndays { // this year
                    NaiveDate::from_of(year, Of::new(ordinal, flags))
                } else { // ordinal > ndays, next year
                    let nextflags = YearFlags::from_year(year + 1);
                    NaiveDate::from_of(year + 1, Of::new(ordinal - ndays, nextflags))
                }
            }
        } else {
            None
        }
    }
pub fn from_isoywd_opt ( year : i32 , week : u32 , weekday : Weekday ) -> Option < NaiveDate > { let flags = YearFlags :: from_year ( year ) ; let nweeks = flags . nisoweeks ( ) ; if 1 <= week && week <= nweeks { // ordinal = week ordinal - delta let weekord = week * 7 + weekday as u32 ; let delta = flags . isoweek_delta ( ) ; if weekord <= delta { // ordinal < 1, previous year let prevflags = YearFlags :: from_year ( year - 1 ) ; NaiveDate :: from_of ( year - 1 , Of :: new ( weekord + prevflags . ndays ( ) - delta , prevflags ) ) } else { let ordinal = weekord - delta ; let ndays = flags . ndays ( ) ; if ordinal <= ndays { // this year NaiveDate :: from_of ( year , Of :: new ( ordinal , flags ) ) } else { // ordinal > ndays, next year let nextflags = YearFlags :: from_year ( year + 1 ) ; NaiveDate :: from_of ( year + 1 , Of :: new ( ordinal - ndays , nextflags ) ) } } } else { None } }
Makes a new `NaiveDate` from ISO week date (year and week number) and day of the week (DOW).
Makes a new ` NaiveDate ` from ISO week date ( year and week number ) and day of the week ( DOW ) .
year
i32
week
u32
weekday
Weekday
year
i32
week
u32
weekday
Weekday