Neos\Flow\I18n\Parser\DatetimeParser::parseDatetimeWithCustomPattern PHP Méthode

parseDatetimeWithCustomPattern() public méthode

Format must obey syntax defined in CLDR specification, excluding unimplemented features (see documentation for DatesReader class). Format is remembered in cache and won't be parsed again for some time.
See also: DatesReader
public parseDatetimeWithCustomPattern ( string $datetimeToParse, string $format, Locale $locale, boolean $strictMode = true ) : mixed
$datetimeToParse string Date/time to be parsed
$format string Format string
$locale Neos\Flow\I18n\Locale A locale used for finding literals array
$strictMode boolean Work mode (strict when TRUE, lenient when FALSE)
Résultat mixed Array of parsed date / time elements, FALSE on failure
    public function parseDatetimeWithCustomPattern($datetimeToParse, $format, I18n\Locale $locale, $strictMode = true)
    {
        return $this->doParsingWithParsedFormat($datetimeToParse, $this->datesReader->parseCustomFormat($format), $this->datesReader->getLocalizedLiteralsForLocale($locale), $strictMode);
    }