Symfony\Component\Intl\DateFormatter\DateFormat\FullTransformer
Parser and formatter for date formats
- Author: Igor Wiedler <igor@wiedler.ch>
Synopsis
class FullTransformer
{
- // members
- private string $quoteMatch;
- private string $implementedChars;
- private string $notImplementedChars;
- private $regExp;
- private array $transformers;
- private $pattern;
- private $timezone;
- // methods
- public void __construct()
- public array getTransformers()
- public string format()
- public string formatReplace()
- public int parse()
- public string getReverseMatchingRegExp()
- public Boolean isQuoteMatch()
- public string replaceQuoteMatch()
- protected string buildCharsMatch()
- protected array normalizeArray()
- protected Boolean|int calculateUnixTimestamp()
- private array getDefaultValueForOptions()
Hierarchy
Members
private
- $implementedChars
- $notImplementedChars
- $pattern
- $quoteMatch
- $regExp
- $timezone
- $transformers — array
Methods
private
- getDefaultValueForOptions() — Add sensible default values for missing items in the extracted date/time options array. The values are base in the beginning of the Unix era
protected
- buildCharsMatch() — Builds a chars match regular expression
- calculateUnixTimestamp() — Calculates the Unix timestamp based on the matched values by the reverse matching regular expression of parse()
- normalizeArray() — Normalize a preg_replace match array, removing the numeric keys and returning an associative array with the value and pattern values for the matched Transformer
public
- __construct() — Constructor
- format() — Format a DateTime using ICU dateformat pattern
- formatReplace() — Return the formatted ICU value for the matched date characters
- getReverseMatchingRegExp() — Retrieve a regular expression to match with a formatted value.
- getTransformers() — Return the array of Transformer objects
- isQuoteMatch() — Check if the first char of a string is a single quote
- parse() — Parse a pattern based string to a timestamp value
- replaceQuoteMatch() — Replaces single quotes at the start or end of a string with two single quotes