system/I18n/Time.php
public function toLocalizedString(?string $format = null)
	{
		$format = $format ?? $this->toStringFormat;

		return IntlDateFormatter::formatObject($this->toDateTime(), $format, $this->locale);
	}
public function toLocalizedString(?string $format = null)
	{
		$format = $format ?? $this->toStringFormat;

		return IntlDateFormatter::formatObject($this->toDateTime(), $format, $this->locale);
	}
Returns the localized value of this instance in $format.

@param string|null $format

@return string|boolean
@throws \Exception