/**
* Returns dateTime formatted by custom format, string provided in parameter.
*
* Format must obey syntax defined in CLDR specification, excluding
* unimplemented features (see documentation for DatesReader class).
*
* Format is remembered in this classes cache and won't be parsed again for
* some time.
*
* @param \DateTimeInterface $dateTime PHP object representing particular point in time
* @param string $format Format string
* @param Locale $locale A locale used for finding literals array
* @return string Formatted date / time. Unimplemented subformats in format string will be silently ignored
* @api
* @see \Neos\Flow\I18n\Cldr\Reader\DatesReader
*/
public function formatDateTimeWithCustomPattern(\DateTimeInterface $dateTime, $format, Locale $locale)
{
return $this->doFormattingWithParsedFormat($dateTime, $this->datesReader->parseCustomFormat($format), $this->datesReader->getLocalizedLiteralsForLocale($locale));
}