Neos\Flow\I18n\Parser\DatetimeParser::parseTime PHP Method

parseTime() public method

Parses time with format string for time defined in CLDR for particular locale.
public parseTime ( string $timeToParse, Locale $locale, string $formatLength = DatesReader::FORMAT_LENGTH_DEFAULT, boolean $strictMode = true ) : mixed
$timeToParse string Time to be parsed
$locale Neos\Flow\I18n\Locale
$formatLength string One of: full, long, medium, short, or 'default' in order to use default length from CLDR
$strictMode boolean Work mode (strict when TRUE, lenient when FALSE)
return mixed Array of parsed time elements, FALSE on failure
    public function parseTime($timeToParse, I18n\Locale $locale, $formatLength = DatesReader::FORMAT_LENGTH_DEFAULT, $strictMode = true)
    {
        DatesReader::validateFormatLength($formatLength);
        return $this->doParsingWithParsedFormat($timeToParse, $this->datesReader->parseFormatFromCldr($locale, DatesReader::FORMAT_TYPE_TIME, $formatLength), $this->datesReader->getLocalizedLiteralsForLocale($locale), $strictMode);
    }