You are here

public function DateTimePlus::getPhpDateTime in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Component/Datetime/DateTimePlus.php \Drupal\Component\Datetime\DateTimePlus::getPhpDateTime()
  2. 9 core/lib/Drupal/Component/Datetime/DateTimePlus.php \Drupal\Component\Datetime\DateTimePlus::getPhpDateTime()

Gets a clone of the proxied PHP \DateTime object wrapped by this class.

Return value

\DateTime A clone of the wrapped PHP \DateTime object.

File

core/lib/Drupal/Component/Datetime/DateTimePlus.php, line 722

Class

DateTimePlus
Wraps DateTime().

Namespace

Drupal\Component\Datetime

Code

public function getPhpDateTime() {
  return clone $this->dateTimeObject;
}