FullTransformer
class FullTransformer
Parser and formatter for date formats.
Methods
Constructor.
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.
Details
at line line 45
__construct(string $pattern, string $timezone)
Constructor.
at line line 79
Transformer[]
getTransformers()
Return the array of Transformer objects.
at line line 91
string
format(DateTime $dateTime)
Format a DateTime using ICU dateformat pattern.
at line line 110
string
formatReplace(string $dateChars, DateTime $dateTime)
Return the formatted ICU value for the matched date characters.
at line line 140
int
parse(DateTime $dateTime, string $value)
Parse a pattern based string to a timestamp value.
at line line 177
string
getReverseMatchingRegExp(string $pattern)
Retrieve a regular expression to match with a formatted value.
at line line 213
bool
isQuoteMatch(string $quoteMatch)
Check if the first char of a string is a single quote.
at line line 225
string
replaceQuoteMatch(string $quoteMatch)
Replaces single quotes at the start or end of a string with two single quotes.