PHP Class Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToLocalizedStringTransformer
Options:
* "input": The type of the normalized format ("time" or "timestamp"). Default: "datetime"
* "output": The type of the transformed format ("string" or "array"). Default: "string"
* "format": The format of the time string ("short", "medium", "long" or "full"). Default: "short"
Datei anzeigen
Open project: pmjones/php-framework-benchmarks
Class Usage Examples
Public Methods
Method |
Description |
|
__construct ( string $inputTimezone = null, string $outputTimezone = null, integer $dateFormat = null, integer $timeFormat = null, IntlDateFormatter $calendar = IntlDateFormatter::GREGORIAN, string $pattern = null ) |
Constructor. |
|
reverseTransform ( string | array $value ) : DateTime |
Transforms a localized date string/array into a normalized date. |
|
transform ( DateTime $dateTime ) : string | array |
Transforms a normalized date into a localized date string/array. |
|
Protected Methods
Method |
Description |
|
getIntlDateFormatter ( ) : IntlDateFormatter |
Returns a preconfigured IntlDateFormatter instance |
|
Method Details
__construct()
public method
public __construct ( string $inputTimezone = null, string $outputTimezone = null, integer $dateFormat = null, integer $timeFormat = null, IntlDateFormatter $calendar = IntlDateFormatter::GREGORIAN, string $pattern = null ) |
$inputTimezone |
string |
The name of the input timezone |
$outputTimezone |
string |
The name of the output timezone |
$dateFormat |
integer |
The date format |
$timeFormat |
integer |
The time format |
$calendar |
IntlDateFormatter |
An \IntlDateFormatter instance |
$pattern |
string |
A pattern to pass to \IntlDateFormatter |