fn modified_preceding(&self, mut day: NaiveDate) -> Option<NaiveDate> {
        let unadjusted = day;
        if self.is_business(day) {
            return Some(day);
        }

        while day > chrono::naive::MIN_DATE{
            day -= Duration::days(1);
            if day.month() != unadjusted.month() {
                break;
            }            
            if self.is_business(day) {
                return Some(day);
            }
        }

        day = unadjusted;
        while day < chrono::naive::MAX_DATE {
            day += Duration::days(1);
            if self.is_business(day) {
                return Some(day);
            }
        }
        None
    }
/// Calculates the adjusted date using the `following` convention and returns it in a form of
/// `Option<NaiveDate>` enum.
///
/// If the supplied date is a business date, it is returned with no adjustment.
/// Otherwise, the adjusted date will be the first business day before the unadjusted date,
/// unless it falls in the previous month. In such case, the next following bussiness day is
/// the adjusted date.
///
/// Returns `None` if no such business day exist.
Calculates the adjusted date using the `following` convention and returns it in a form of
`Option` enum.

If the supplied date is a business date, it is returned with no adjustment.
Otherwise, the adjusted date will be the first business day before the unadjusted date,
unless it falls in the previous month. In such case, the next following bussiness day is
the adjusted date.

Returns `None` if no such business day exist.
Calculates the adjusted date using the ` following ` convention and returns it in a form of ` Option ` enum . If the supplied date is a business date it is returned with no adjustment . Otherwise the adjusted date will be the first business day before the unadjusted date unless it falls in the previous month . In such case the next following bussiness day is the adjusted date . Returns ` None ` if no such business day exist .
fn modified_preceding(&self, mut day: NaiveDate) -> Option<NaiveDate> {
        let unadjusted = day;
        if self.is_business(day) {
            return Some(day);
        }
        while day > chrono::naive::MIN_DATE{
            day -= Duration::days(1);
            if day.month() != unadjusted.month() {
                break;
            }            
            if self.is_business(day) {
                return Some(day);
            }
        }
        day = unadjusted;
        while day < chrono::naive::MAX_DATE {
            day += Duration::days(1);
            if self.is_business(day) {
                return Some(day);
            }
        }
        None
    }
fn modified_preceding ( & self , mut day : NaiveDate ) -> Option < NaiveDate > { let unadjusted = day ; if self . is_business ( day ) { return Some ( day ) ; } while day > chrono :: naive :: MIN_DATE { day -= Duration :: days ( 1 ) ; if day . month ( ) != unadjusted . month ( ) { break ; } if self . is_business ( day ) { return Some ( day ) ; } } day = unadjusted ; while day < chrono :: naive :: MAX_DATE { day += Duration :: days ( 1 ) ; if self . is_business ( day ) { return Some ( day ) ; } } None }
Calculates the adjusted date using the `following` convention and returns it in a form of
`Option<NaiveDate>` enum.
Calculates the adjusted date using the ` following ` convention and returns it in a form of ` Option<NaiveDate > ` enum .
&self
day
NaiveDate