Return date in RFC2822 format

@return string
976473
public function Rfc2822()
    {
        $formatter = $this->getInternalFormatter();
        $formatter->setPattern('y-MM-dd HH:mm:ss');
        return $formatter->format($this->getTimestamp());
    }
129602
public function getFormattedDateRangeDate() {

    // Load session instance date range date values.
    $timestamp = $this->get('timestamp')->value;
    $year_start = date('Y', $timestamp);
    $month_day_start = date('M j', $timestamp);
    $timestamp_to = $this->get('timestamp_to')->value;
    $year_to = date('Y', $timestamp_to);
    $month_day_to = date('M j', $timestamp_to);

    // Format date range to eliminate repeated values.
    if ($year_start == $year_to) {
      if (date('M', $timestamp) == date('M', $timestamp_to)) {
        if ($month_day_start == $month_day_to) {
          // M j, Y.
          $formatted_date = "$month_day_start, $year_start";
        }
        else {
          // M j - j, Y.
          $day_to = date('j', $timestamp_to);
          $formatted_date =  "$month_day_start - $day_to, $year_start";
        }
      }
      else {
        // M j - M j, Y.
        $formatted_date =  "$month_day_start - $month_day_to, $year_start";
      }
    }
    else {
      // M j, Y - M j, Y.
      $formatted_date = $month_day_start . ", $year_start - " . $month_day_to . ", $year_to";
    }

    return $formatted_date;
  }
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;
    }
1244911
public function getTstamp() : string
    {
        return $this->getYear() . '-' . $this->getMonth() . '-' . $this->getDay() . ' ' . $this->getHours() . ':' . $this->getMinutes() . ':' . $this->getSeconds();
    }
563313
public function getServerDate($format = null)
    {
        $node = $this->getFirst('//epp:epp/epp:greeting/epp:svDate');
        if ($format === null) {
            return $node->nodeValue;
        }

        return date_create_from_format($format, $node->nodeValue);
    }
755719
public function ToString()
	{
		$result = "";
		$format = "H:i:s";

		if ( ! @empty( $this->Value->microseconds != 0 ) )
		{
			$format .= "." . rtrim( $this->Value->microseconds, "0" );
		}

		if ( ! $this->IsLocal )
		{
			$format .= $this->Value->getOffset() == 0
	   		 	? "\Z"
	   			: "P";
		}

		return $this->Value->format( $format );
	}
121960
public function getImportFilename()
    {
        // Note: CLDR date format see DBDatetime
        $datetime = DBDatetime::now()->Format('y-MM-dd-HHmmss');
        return str_replace('{date}', $datetime, $this->config()->get('storage_filename'));
    }
676611
def _parse_date_rfc822(dateString):
    ''''''
    data = dateString.split()
    if data[0][-1] in (',', '.') or data[0].lower() in rfc822._daynames:
        del data[0]
    if len(data) == 4:
        s = data[3]
        i = s.find('+')
        if i > 0:
            data[3:] = [s[:i], s[i+1:]]
        else:
            data.append('')
        dateString = " ".join(data)
    if len(data) < 5:
        dateString += ' 00:00:00 GMT'
    return rfc822.parsedate_tz(dateString)
628491
public function getProtocolVersion():string {
		if(strstr($this->protocol, "/")) {
			return substr(
				$this->protocol,
				strpos($this->protocol, "/") + 1
			);
		}

		return $this->protocol;
	}
207192
public function getDateFormat()
	{
		$date = strftime("%x", mktime(0, 0, 0, 1, 31, 2009));
		if (preg_match("/31[- \/.]0?1[- \/.](20)?09/", $date))
		{
			return DATEFORMAT::DMY;
		}
		elseif (preg_match("/0?1[- \/.]31[- \/.](20)?09/", $date))
		{
			return DATEFORMAT::MDY;
		}
		else
		{
			return DATEFORMAT::YMD;
		}
	}
724878
public function getPasswordLastSetDate()
    {
        if ($timestamp = $this->getPasswordLastSetTimestamp()) {
            return (new DateTime())->setTimestamp($timestamp)->format($this->dateFormat);
        }
    }
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 '---';
    }
927220
protected function convertDate($date) : string
    {
        if (is_a($date, 'DateTime')) {
            return (string) $date->format(DateTime::ISO8601);
        }

        return $date;
    }
1165831
private function determineDateFormat()
    {
        if ($format = \trim($this->get('dateformat'))) {
            return $format;
        }

        return Date::getFormatFromRgxp($this->get('timetype'));
    }
1368820
public static String formatRFC822Date(Date date) {
        try {
            return rfc822DateFormat.print(date.getTime());
        } catch(RuntimeException ex) {
            throw handleException(ex);
        }
    }
47906
public function ToString()
	{
		// Reading all non-zero date parts.
		$date = array_filter(array(
			'D' => @isset( $this->Value->daysOnly ) && $this->Value->daysOnly && $this->Value->days ? $this->Value->days : $this->Value->d
			// 'D' => $this->Value->days
		));

		$microseconds = "";
		if ( ! @empty( $this->Value->microseconds ) && ! empty( rtrim( $this->Value->microseconds, "0" ) ) )
		{
			$microseconds = str_pad( substr( "." . $this->Value->microseconds, 0, 4 ), 4, "0", STR_PAD_RIGHT );
		}

		// Reading all non-zero time parts.
		$time = array_filter(array
		(
			'H' => $this->Value->h,
			'M' => $this->Value->i,
			'S' => $this->Value->s . $microseconds,
		));

		$specString = 'P';

		// Adding each part to the spec-string.
		foreach ($date as $key => $value)
		{
			$specString .= $value . $key;
		}

		if ( count( $time ) > 0 )
		{
			$specString .= 'T';
			foreach ( $time as $key => $value )
			{
				$specString .= $value . $key;
			}
		}

		return $specString == "P"
			? $this->ZeroStringValue()
			: ( $this->Value->invert ? "-" : "" ) . $specString;
	}
910823
public function getPHPTimePattern()
    {
        $isoFormat = Calendar::getTimeFormat('short');
        $result = Calendar::tryConvertIsoToPhpFormat($isoFormat);
        if ($result === null) {
            $result = t(/*i18n: Short time format: see http://www.php.net/manual/en/function.date.php */ 'g.i A');
        }

        return $result;
    }