if (isset($options['invalid_message_parameters'
])) { $dayOptions['invalid_message_parameters'
] =
$options['invalid_message_parameters'
];
$monthOptions['invalid_message_parameters'
] =
$options['invalid_message_parameters'
];
$yearOptions['invalid_message_parameters'
] =
$options['invalid_message_parameters'
];
} $formatter =
new \
IntlDateFormatter( \Locale::
getDefault(),
$dateFormat,
$timeFormat,
// see https://bugs.php.net/66323
class_exists(\IntlTimeZone::
class, false
) ? \IntlTimeZone::
createDefault() : null,
$calendar,
$pattern );
// new \IntlDateFormatter may return null instead of false in case of failure, see https://bugs.php.net/66323
if (!
$formatter) { throw new InvalidOptionsException(intl_get_error_message(),
intl_get_error_code());
} $formatter->
setLenient(false
);