Exemple #1
0
 /**
  * Set birthday.
  *
  * @param integer $years Years.
  */
 protected function setBirthday($years = 0)
 {
     $date = new \DateTime();
     $this->birthday = $years ? self::$faker->dateTimeBetween('-' . $years . ' years', (int) $date->format('Y') - $years + 1 . '-01-01')->format('Y-m-d') : self::$faker->date('Y-m-d', '2002-01-01');
 }