You are here

public function PersianDate::getOriginalDateTime in Persian Date for Drupal 8 8

Same name and namespace in other branches
  1. 8.4 src/Converter/PersianDate.php \Drupal\persian_date\Converter\PersianDate::getOriginalDateTime()

Builds original PHP DateTime class.

Return value

\DateTime

File

src/Converter/PersianDate.php, line 27

Class

PersianDate
This class hold time and represents it in Persian Date format.

Namespace

Drupal\persian_date\Converter

Code

public function getOriginalDateTime() {
  $object = new parent();
  $object
    ->setTimestamp($this
    ->getTimestamp());
  $object
    ->setTimezone($this
    ->getTimezone());
  return $object;
}