Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToLocalizedStringTransformer::__construct
Constructor.
Signature
public function __construct([string
$inputTimezone = null,
[string
$outputTimezone = null,
[integer
$dateFormat = null,
[integer
$timeFormat = null,
[integer
$calendar = IntlDateFormatter::GREGORIAN,
[string
$pattern = null]]]]]] )
Parameters
$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
—
integer
- One of the \IntlDateFormatter calendar constants
$pattern
—
string
- A pattern to pass to \IntlDateFormatter
Errors/Exceptions
-
UnexpectedTypeException
- If a format is not supported or if a timezone is not a string