dob() public static method

Checks date of birth formal format for Norway (dd.mm.yyyy), afterwards checks if is a valid gregorian calendar date.
public static dob ( string $check ) : boolean
$check string the date of birth.
return boolean Success.
Example #1
0
 /**
  * test the dob method of NoValidation
  *
  * @return void
  */
 public function testDob()
 {
     // Examples from https://no.wikipedia.org/wiki/Dato
     $this->assertTrue(NoValidation::dob('10.8.1962'));
     $this->assertTrue(NoValidation::dob('10.08.1962'));
     $this->assertTrue(NoValidation::dob('10.8.62'));
     $this->assertTrue(NoValidation::dob('10.08.62'));
     $this->assertTrue(NoValidation::dob('02.08.1965'));
     $this->assertTrue(NoValidation::dob('2.8.1965'));
     $this->assertTrue(NoValidation::dob('02.08.65'));
     $this->assertTrue(NoValidation::dob('2.8.65'));
     $this->assertFalse(NoValidation::dob('10/8/1962'));
     $this->assertFalse(NoValidation::dob('10.24.1962'));
 }