parseCustomFormat() 공개 메소드

Returns parsed date or time format string provided as parameter.
public parseCustomFormat ( string $format ) : array
$format string Format string to parse
리턴 array An array representing parsed format
 /**
  * Returns number formatted by custom format, string provided in parameter.
  *
  * Format must obey syntax defined in CLDR specification, excluding
  * unimplemented features (see documentation for this class).
  *
  * Format is remembered in this classes cache and won't be parsed again for
  * some time.
  *
  * @param mixed $number Float or int, can be negative, can be NaN or infinite
  * @param string $format Format string
  * @param Locale $locale A locale used for finding symbols array
  * @return string Formatted number. Will return string-casted version of $number if pattern is not valid / supported
  * @api
  */
 public function formatNumberWithCustomPattern($number, $format, Locale $locale)
 {
     return $this->doFormattingWithParsedFormat($number, $this->numbersReader->parseCustomFormat($format), $this->numbersReader->getLocalizedSymbolsForLocale($locale));
 }
 /**
  * Parses number given as a string using provided format.
  *
  * @param string $numberToParse Number to be parsed
  * @param string $format Number format to use
  * @param Locale $locale Locale to use
  * @param boolean $strictMode Work mode (strict when TRUE, lenient when FALSE)
  * @return mixed Parsed float number or FALSE on failure
  * @api
  */
 public function parseNumberWithCustomPattern($numberToParse, $format, Locale $locale, $strictMode = true)
 {
     return $this->doParsingWithParsedFormat($numberToParse, $this->numbersReader->parseCustomFormat($format), $this->numbersReader->getLocalizedSymbolsForLocale($locale), $strictMode);
 }