src/ExpressiveDate.php
protected function setDateAttribute($attribute, $value)
	{
		switch ($attribute)
		{
			case 'Day':
				return $this->setDate($this->getYear(), $this->getMonth(), $value);
				break;
			case 'Month':
				return $this->setDate($this->getYear(), $value, $this->getDay());
				break;
			case 'Year':
				return $this->setDate($value, $this->getMonth(), $this->getDay());
				break;
			case 'Hour':
				return $this->setTime($value, $this->getMinute(), $this->getSecond());
				break;
			case 'Minute':
				return $this->setTime($this->getHour(), $value, $this->getSecond());
				break;
			case 'Second':
				return $this->setTime($this->getHour(), $this->getMinute(), $value);
				break;
		}

		throw new InvalidArgumentException('The date attribute ['.$attribute.'] could not be set.');
	}
protected function setDateAttribute($attribute, $value)
	{
		switch ($attribute)
		{
			case 'Day':
				return $this->setDate($this->getYear(), $this->getMonth(), $value);
				break;
			case 'Month':
				return $this->setDate($this->getYear(), $value, $this->getDay());
				break;
			case 'Year':
				return $this->setDate($value, $this->getMonth(), $this->getDay());
				break;
			case 'Hour':
				return $this->setTime($value, $this->getMinute(), $this->getSecond());
				break;
			case 'Minute':
				return $this->setTime($this->getHour(), $value, $this->getSecond());
				break;
			case 'Second':
				return $this->setTime($this->getHour(), $this->getMinute(), $value);
				break;
		}

		throw new InvalidArgumentException('The date attribute ['.$attribute.'] could not be set.');
	}
protected function setDateAttribute ( $ attribute , $ value ) { switch ( $ attribute ) { case 'Day' : return $ this -> setDate ( $ this -> getYear ( ) , $ this -> getMonth ( ) , $ value ) ; break ; case 'Month' : return $ this -> setDate ( $ this -> getYear ( ) , $ value , $ this -> getDay ( ) ) ; break ; case 'Year' : return $ this -> setDate ( $ value , $ this -> getMonth ( ) , $ this -> getDay ( ) ) ; break ; case 'Hour' : return $ this -> setTime ( $ value , $ this -> getMinute ( ) , $ this -> getSecond ( ) ) ; break ; case 'Minute' : return $ this -> setTime ( $ this -> getHour ( ) , $ value , $ this -> getSecond ( ) ) ; break ; case 'Second' : return $ this -> setTime ( $ this -> getHour ( ) , $ this -> getMinute ( ) , $ value ) ; break ; } throw new InvalidArgumentException ( 'The date attribute [' . $ attribute . '] could not be set.' ) ; }
Set a date attribute.

@param  string  $attribute
@return mixed
Set a date attribute .