pub fn valid(&self) -> bool {
        let ymd = format!(
            "{:02}{:02}{:02}",
            self.date.year() % 100,
            self.date.month(),
            self.date.day()
        );

        let to_control = format!("{:06}{:03}", ymd, self.serial);

        self.serial > 0 && luhn(to_control) == self.control
    }
/// Validate a Personnummer. The validation requires a valid date and that the Luhn checksum
/// matches the control digit.
Validate a Personnummer. The validation requires a valid date and that the Luhn checksum
matches the control digit.
Validate a Personnummer . The validation requires a valid date and that the Luhn checksum matches the control digit .
pub fn valid(&self) -> bool {
        let ymd = format!(
            "{:02}{:02}{:02}",
            self.date.year() % 100,
            self.date.month(),
            self.date.day()
        );
        let to_control = format!("{:06}{:03}", ymd, self.serial);
        self.serial > 0 && luhn(to_control) == self.control
    }
pub fn valid ( & self ) -> bool { let ymd = format ! ( " " self date year ( ) 100 self date month ( ) self date day ( ) ) ; let to_control = format ! ( " " ymd self serial ) ; self . serial > 0 && luhn ( to_control ) == self . control }
Validate a Personnummer.
Validate a Personnummer .
&self
&self