Symfony\Component\Intl\DateFormatter\IntlDateFormatter::create
Static constructor
Signature
public function create(string
$locale,
[int
$datetype = null,
[int
$timetype = null,
[string
$timezone = null,
[int
$calendar = self::GREGORIAN,
[string
$pattern = null]]]]] )
Parameters
$locale
—
string
- The locale code. The only currently supported locale is "en".
$datetype
—
int
- Type of date formatting, one of the format type constants
$timetype
—
int
- Type of time formatting, one of the format type constants
$timezone
—
string
- Timezone identifier
$calendar
—
int
- Calendar to use for formatting or parsing; default is Gregorian.
One of the calendar constants.
$pattern
—
string
- Optional pattern to use when formatting
Returns
- IntlDateFormatter
Errors/Exceptions
-
MethodArgumentValueNotImplementedException
- When $locale different than "en" is passed
-
MethodArgumentValueNotImplementedException
- When $calendar different than GREGORIAN is passed