You are here

function DatexDrupalDateTime::origin in Datex 8

File

src/Datex/DatexDrupalDateTime.php, line 33

Class

DatexDrupalDateTime

Namespace

Drupal\datex\Datex

Code

function origin() : DrupalDateTime {
  $me = new DrupalDateTime($this
    ->getTimestamp(), $this
    ->getTimezone(), [
    'langcode' => $this->langcode,
  ]);
  $me->formatTranslationCache = $this->formatTranslationCache;
  $me->stringTranslation = $this->stringTranslation;
  $me->inputTimeRaw = $this->inputTimeRaw;
  $me->inputTimeAdjusted = $this->inputTimeAdjusted;
  $me->inputTimeZoneRaw = $this->inputTimeZoneRaw;
  $me->inputTimeZoneAdjusted = $this->inputTimeZoneAdjusted;
  $me->inputFormatRaw = $this->inputFormatRaw;
  $me->inputFormatAdjusted = $this->inputFormatAdjusted;
  $me->langcode = $this->langcode;
  $me->errors = $this->errors;
  $me->dateTimeObject = $this->dateTimeObject;
  $me
    ->setTimestamp($this
    ->getTimestamp());
  return $me;
}