@@ -118,13 +118,13 @@ class IntlDateFormatter
118118private $ timeZoneId ;
119119
120120/**
121- * @param string $locale The locale code. The only currently supported locale is "en" (or null using the default locale, i.e. "en")
122- * @param int $datetype Type of date formatting, one of the format type constants
123- * @param int $timetype Type of time formatting, one of the format type constants
124- * @param mixed $timezone Timezone identifier
125- * @param int $calendar Calendar to use for formatting or parsing. The only currently
126- * supported value is IntlDateFormatter::GREGORIAN (or null using the default calendar, i.e. "GREGORIAN")
127- * @param string $pattern Optional pattern to use when formatting
121+ * @param string $locale The locale code. The only currently supported locale is "en" (or null using the default locale, i.e. "en")
122+ * @param int|null $datetype Type of date formatting, one of the format type constants
123+ * @param int|null $timetype Type of time formatting, one of the format type constants
124+ * @param mixed $timezone Timezone identifier
125+ * @param int $calendar Calendar to use for formatting or parsing. The only currently
126+ * supported value is IntlDateFormatter::GREGORIAN (or null using the default calendar, i.e. "GREGORIAN")
127+ * @param string $pattern Optional pattern to use when formatting
128128 *
129129 * @see http://www.php.net/manual/en/intldateformatter.create.php
130130 * @see http://userguide.icu-project.org/formatparse/datetime
@@ -144,6 +144,8 @@ public function __construct($locale, $datetype, $timetype, $timezone = null, $ca
144144
145145$ this ->datetype =$ datetype ;
146146$ this ->timetype =$ timetype ;
147+ $ this ->datetype =null !==$ datetype ?$ datetype :self ::FULL ;
148+ $ this ->timetype =null !==$ timetype ?$ timetype :self ::FULL ;
147149
148150$ this ->setPattern ($ pattern );
149151$ this ->setTimeZone ($ timezone );