fn month_weekday(month: u8, week: u8, week_day: u8) -> Result<Self, Error> {
        if month < 1 || month > 12 {
            return Err(Error::TransitionRule("invalid rule day month"));
        }

        if week < 1 || week > 5 {
            return Err(Error::TransitionRule("invalid rule day week"));
        }

        if week_day > 6 {
            return Err(Error::TransitionRule("invalid rule day week day"));
        }

        Ok(RuleDay::MonthWeekday { month, week, week_day })
    }
/// Construct a transition rule day represented by a month, a month week and a week day
Construct a transition rule day represented by a month, a month week and a week day
Construct a transition rule day represented by a month a month week and a week day
fn month_weekday(month: u8, week: u8, week_day: u8) -> Result<Self, Error> {
        if month < 1 || month > 12 {
            return Err(Error::TransitionRule("invalid rule day month"));
        }
        if week < 1 || week > 5 {
            return Err(Error::TransitionRule("invalid rule day week"));
        }
        if week_day > 6 {
            return Err(Error::TransitionRule("invalid rule day week day"));
        }
        Ok(RuleDay::MonthWeekday { month, week, week_day })
    }
fn month_weekday ( month : u8 , week : u8 , week_day : u8 ) -> Result < Self , Error > { if month < 1 || month > 12 { return Err ( Error :: TransitionRule ( " " ) ) ; } if week < 1 || week > 5 { return Err ( Error :: TransitionRule ( " " ) ) ; } if week_day > 6 { return Err ( Error :: TransitionRule ( " " ) ) ; } Ok ( RuleDay :: MonthWeekday { month , week , week_day } ) }
Construct a transition rule day represented by a month, a month week and a week day
Construct a transition rule day represented by a month a month week and a week day
month
u8
week
u8
week_day
u8
month
u8
week
u8
week_day
u8