pub fn rate_of_pays_for_date(&self, date: String) -> &RateOfPay {

        // get target date and structure for PartialOrd
        let target_date: NaiveDate = NaiveDate::parse_from_str(
            date.as_str(),
            "%Y-%m-%d").unwrap();
        
        let target_rate = check_active_pay_rate(&self.rates_of_pay, target_date);
        
        &target_rate
    }
// Accepts a YYYY-MM-DD string and returns the payrate_of_pay in effect for the date provided, past, present or future.
Accepts a YYYY-MM-DD string and returns the payrate_of_pay in effect for the date provided, past, present or future.
Accepts a YYYY - MM - DD string and returns the payrate_of_pay in effect for the date provided past present or future .
pub fn rate_of_pays_for_date(&self, date: String) -> &RateOfPay {
        // get target date and structure for PartialOrd
        let target_date: NaiveDate = NaiveDate::parse_from_str(
            date.as_str(),
            "%Y-%m-%d").unwrap();
        let target_rate = check_active_pay_rate(&self.rates_of_pay, target_date);
        &target_rate
    }
pub fn rate_of_pays_for_date ( & self , date : String ) -> & RateOfPay { // get target date and structure for PartialOrd let target_date : NaiveDate = NaiveDate :: parse_from_str ( date . as_str ( ) , " " ) . unwrap ( ) ; let target_rate = check_active_pay_rate ( & self . rates_of_pay , target_date ) ; & target_rate }
Accepts a YYYY-MM-DD string and returns the payrate_of_pay in effect for the date provided, past, present or future.
Accepts a YYYY - MM - DD string and returns the payrate_of_pay in effect for the date provided past present or future .
&self
date
String