@return DateTime|null

@deprecated since version 2.2 and will be removed in 3.0
337812
public function getUsedAt()
    {
        @trigger_error(
            'The '.__METHOD__
            .' method is deprecated since version 2.2 and will be removed in 3.0. Use the getLastUsage() method instead.',
            E_USER_DEPRECATED
        );

        $usage = $this->getLastUsage();
        if (null === $usage) {
            return null;
        }

        return $usage->getCreatedAt();
    }
37691
public function getDate(): \DateTime
    {
        /*
            RFC2616 - 14.18 says all Responses need to have a Date.
            Make sure we provide one even if it the header
            has been removed in the meantime.
         */
        if (!$this->header->has('Date')) {
            $this->setDate(\DateTime::createFromFormat('U', (string) \time()));
        }

        return $this->header->getDate('Date');
    }
675511
public function getDateOfBirth() : ?DateTime
     {
        $rtn = $this->data['date_of_birth'];

        if (!empty($rtn)) {
            $rtn = new DateTime($rtn);
        }

        return $rtn;
     }
891166
public function getDateUpdated() : DateTime
     {
        $rtn = $this->data['date_updated'];

        if (!empty($rtn)) {
            $rtn = new DateTime($rtn);
        }

        return $rtn;
     }
597482
public static function datetime($time = null, $nowIfNull = true, $format = 'Y-m-d H:i:s')
    {
        if (empty($time)) {
            return $nowIfNull ? date($format) : null;
        } else {
            return date($format, $time);
        }
    }
882129
public function loadDate()
    {
        return (file_exists($this->lastHarvestFile))
            ? trim(current(file($this->lastHarvestFile))) : null;
    }
454479
public function getTargetAvailableDate(): \Lullabot\Mpx\DataService\DateTime\DateTimeFormatInterface
    {
        if (!$this->targetAvailableDate) {
            return new NullDateTime();
        }

        return $this->targetAvailableDate;
    }
613241
public function getExpirationDate(): \Lullabot\Mpx\DataService\DateTime\DateTimeFormatInterface
    {
        if (!$this->expirationDate) {
            return new NullDateTime();
        }

        return $this->expirationDate;
    }
746913
public function getValue()
	{
		$value = parent::getValue();
		if ($value instanceof \DateTime) {
			$value->setTime(0, 0, 0);
			return $value;
		}
		return $value;
	}
171820
public function getAdded(): \Lullabot\Mpx\DataService\DateTime\DateTimeFormatInterface
    {
        if (!$this->added) {
            return new NullDateTime();
        }

        return $this->added;
    }
28888
public function getLastModified(): \DateTime
    {
        if ($this->caching == false) {
            return \DateTime::createFromFormat("F d Y H:i:s.", date("F d Y H:i:s.", filemtime($this->getAbsoluteFilePath())));
        }

        if ($this->lastModified == null) {
            $this->lastModified = \DateTime::createFromFormat("F d Y H:i:s.", date("F d Y H:i:s.", filemtime($this->getAbsoluteFilePath())));
        }

        return $this->lastModified;
    }
877934
protected function getDatetimeFormat()
    {
        if( $this->interval !== '* * * * *' )
        {
            $interval = $this->interval.' ';
        }
        else
        {
            $interval = ( $this->minute    ?? '*' ) . ' '.
                        ( $this->hour      ?? '*' ) . ' '.
                        ( $this->dayNumber ?? '*' ) . ' '.
                        ( $this->month     ?? '*' ) . ' '.
                        ( $this->day       ?? '*' ) . ' ';
        }

        $this->defaultIntervalVariables();

        return $interval;
    }
1261072
public function readUNBDateTimeOfPreparation()
    {
        // separate date (YYMMDD) and time (HHMM)
        $date = $this->readEdiDataValue('UNB', 4, 0);
        if (!empty($date)) {
            $time = $this->readEdiDataValue('UNB', 4, 1);
            $datetime = \preg_replace('#(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)#', '20$1-$2-$3 $4:$5:00', $date . $time);

            return $datetime;
        }

        // common YYYYMMDDHHMM
        $datetime = $this->readEdiDataValue('UNB', 4);
        $datetime = \preg_replace('#(\d\d\d\d)(\d\d)(\d\d)(\d\d)(\d\d)#', '$1-$2-$3 $4:$5:00', $datetime);

        return $datetime;
    }
1241084
@Nullable
    public Date getGpsDate()
    {
        String date = getString(TAG_DATE_STAMP);
        Rational[] timeComponents = getRationalArray(TAG_TIME_STAMP);

        // Make sure we have the required values
        if (date == null)
            return null;
        if (timeComponents == null || timeComponents.length != 3)
            return null;

        String dateTime = String.format(Locale.US, "%s %02d:%02d:%02.3f UTC",
            date, timeComponents[0].intValue(), timeComponents[1].intValue(), timeComponents[2].doubleValue());
        try {
            DateFormat parser = new SimpleDateFormat("yyyy:MM:dd HH:mm:ss.S z");
            return parser.parse(dateTime);
        } catch (ParseException e) {
            return null;
        }
    }
374617
public function getDateTime($key)
    {
        $value = $this->get($key);
        if ($value === null) {
            return null;
        }

        return new \DateTime($value);
    }
399477
protected function getModifiedSince() : \DateTime
    {
        if (is_null($this->since)) {
            $this->since = new \DateTime('@0');
        }

        return $this->since;
    }
644094
public function getUpdatedAt()
    {
        if (!$this->updatedAt) {
            return null;
        } else {
            return $this->updatedAt
                ->setTimezone(new DateTimeZone(app('config')->timezone));
        }
    }