Cake\Chronos\ChronosInterface::toDateString PHP Method

toDateString() public method

Format the instance as date
public toDateString ( ) : string
return string
    public function toDateString();

Usage Example

Beispiel #1
0
 /**
  * Checks if the passed in date is the same day as the instance current day.
  *
  * @param ChronosInterface $dt The instance to check against.
  * @return bool
  */
 public function isSameDay(ChronosInterface $dt)
 {
     return $this->toDateString() === $dt->toDateString();
 }
ChronosInterface