FullTransformer
class FullTransformer
Parser and formatter for date formats.
Methods
No description
Return the array of Transformer objects.
Return the formatted ICU value for the matched date characters.
Retrieve a regular expression to match with a formatted value.
Check if the first char of a string is a single quote.
Replaces single quotes at the start or end of a string with two single quotes.
Builds a chars match regular expression.
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.
Calculates the Unix timestamp based on the matched values by the reverse matching regular expression of parse().
Details
string
formatReplace(string $dateChars, DateTime $dateTime)
Return the formatted ICU value for the matched date characters.
int|false
parse(DateTime $dateTime, string $value)
Parse a pattern based string to a timestamp value.
string
getReverseMatchingRegExp(string $pattern)
Retrieve a regular expression to match with a formatted value.
string
replaceQuoteMatch(string $quoteMatch)
Replaces single quotes at the start or end of a string with two single quotes.
protected array
normalizeArray(array $data)
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.
protected bool|int
calculateUnixTimestamp(DateTime $dateTime, array $options)
Calculates the Unix timestamp based on the matched values by the reverse matching regular expression of parse().