Get the date for this fact.
We can call this function many times, especially when sorting,
so keep a copy of the date.

@return Date
961264
public function date(): Date
    {
        if ($this->date === null) {
            $this->date = new Date($this->attribute('DATE'));
        }

        return $this->date;
    }
619834
public function readDate() {
            $dateref = $this->readU29();
            if (($dateref & 0x01) == 0) {
                $dateref = $dateref >> 1;
                if ($dateref>=count($this->storedObjects)) {
                    throw new Exception('Undefined date reference: ' . $dateref);
                    return false;
                }
                return $this->storedObjects[$dateref];
            }

            $timestamp = floor($this->stream->readDouble() / 1000);

            $dateTime = new DateTime('@' . $timestamp);
            
            $this->storedObjects[] = $dateTime;
            return $dateTime;
        }
588615
public function getCallable()
    {
        return function ($format, $timestamp = null) {
            if (is_null($timestamp)) {
                $timestamp = $this->timestamp;
            }
            return \date($format, $timestamp);
        };
    }
1307780
public Date getFinish()
   {
      Date result = (Date) getCachedValue(AssignmentField.FINISH);
      if (result == null)
      {
         result = getTask().getFinish();
      }
      return result;
   }
960154
public function getOrderDate()
    {
        if ( empty( $this->oxorder__oxorderdate->value ) ) {
            return '';
        }

        return date( 'Y-m-d', strtotime( $this->oxorder__oxorderdate->value ) );
    }
1133342
public Date getUnsharedAt() {
        if(mBodyMap.containsKey(BoxItem.FIELD_SHARED_LINK)) {
            return  ((BoxSharedLink) mBodyMap.get(BoxItem.FIELD_SHARED_LINK)).getUnsharedDate();
        }
        return null;
    }
1114864
public function get_due_date() {
        $deadlines = array();
        if ($this->quizobj->get_quiz()->timelimit) {
            $deadlines[] = $this->attempt->timestart + $this->quizobj->get_quiz()->timelimit;
        }
        if ($this->quizobj->get_quiz()->timeclose) {
            $deadlines[] = $this->quizobj->get_quiz()->timeclose;
        }
        if ($deadlines) {
            $duedate = min($deadlines);
        } else {
            return false;
        }

        switch ($this->attempt->state) {
            case self::IN_PROGRESS:
                return $duedate;

            case self::OVERDUE:
                return $duedate + $this->quizobj->get_quiz()->graceperiod;

            default:
                throw new coding_exception('Unexpected state: ' . $this->attempt->state);
        }
    }
1295131
public function getDate() : ?string 
    {
        if ( ! $this->hasDate()) {
            $this->setDate($this->getDefaultDate());
        }
        return $this->date;
    }
849739
function() {
			var date = new Date(); 
			var obj  = this.digitize([
				date.getHours(),
				date.getMinutes(),
				date.getSeconds()				
			]);

			return obj;
		}
1218258
public function get_dategraded() {
        //TODO: HACK - create new fields (MDL-31379)
        if (is_null($this->finalgrade) and is_null($this->feedback)) {
            return null; // no grade == no date
        } else if ($this->overridden) {
            return $this->overridden;
        } else {
            return $this->timemodified;
        }
    }
363127
public function getData()
    {
        $data = $this->getBaseData();

        if ($this->getStartTimestamp()) {
            $data->firstSettlementDate = date(
                static::DATE_TIME_FORMAT,
                $this->getStartTimestamp()
            );
            $data->lastSettlementDate = date(static::DATE_TIME_FORMAT);
        }

        if ($this->getEndTimestamp()) {
            $data->lastSettlementDate = date(
                static::DATE_TIME_FORMAT,
                $this->getEndTimestamp()
            );
        }

        return $data;
    }
1098673
public function getDates()
    {
        $defaults = [static::CREATED_AT, static::UPDATED_AT];

        return $this->usesTimestamps() ? array_merge($this->dates, $defaults) : $this->dates;
    }
173015
public final Date compiledOnDate() {
    SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT);
    try {
      return dateFormat.parse(compiledOn());
    } catch (ParseException e) {
      return null;
    }
  }
376320
public function getBirthDate(): Date
    {
        foreach ($this->getAllBirthDates() as $date) {
            if ($date->isOK()) {
                return $date;
            }
        }

        return new Date('');
    }
969845
public function getDate()
	{
		$date = $this->created_at;
		if (Lang::has('laravel-comments::messages.date_timezone'))
		{
			$oldTimezone = date_default_timezone_get();
			$newTimezone = Lang::get('laravel-comments::messages.date_timezone');
			$date->setTimezone($newTimezone);
			date_default_timezone_set($newTimezone);
		}
		$locale = \App::getLocale();
		if (Lang::has('laravel-comments::messages.date_locale'))
		{
			$locale = Lang::get('laravel-comments::messages.date_locale');
		}
		setlocale(LC_TIME, $locale);
		$dateFormat = trans('laravel-comments::messages.date_format');
		if ($dateFormat == 'laravel-comments::messages.date_format')
		{
			$dateFormat = '%e %B %Y at %H:%M';
		}
		$date = $date->formatLocalized($dateFormat);
		if (Lang::has('laravel-comments::messages.date_timezone'))
		{
			date_default_timezone_set($oldTimezone);
		}
		return $date;
	}
290266
public function getDate()
    {
        $utilsDate = \OxidEsales\Eshop\Core\Registry::getUtilsDate();

        return date('Y-m-d H:i:s', $utilsDate->getTime());
    }
701655
public function getFormattedExpirationDate()
    {
        $date = $this->model->getExpirationDate();

        if ($date instanceof Carbon) {
            $isFuture   = $date->isFuture();
            $translated = $isFuture ? $date->diffForHumans(null, true) : $date->diffForHumans();

            if ($isFuture) {
                $translated = 'in ' . $translated;
            }

            return $translated;
        }

        return '---';
    }