diff --git a/reference/intl/dateformatter/formatobject.xml b/reference/intl/dateformatter/formatobject.xml index 3db00bedd1..febc731538 100644 --- a/reference/intl/dateformatter/formatobject.xml +++ b/reference/intl/dateformatter/formatobject.xml @@ -16,8 +16,8 @@ public static stringIntlDateFormatter::formatObject objectobject - mixedformat - stringlocale + mixedformatNULL + stringlocaleNULL &style.procedural; @@ -26,11 +26,22 @@ public static stringdatefmt_format_object objectobject - mixedformat - stringlocale + mixedformatNULL + stringlocaleNULL - &warn.undocumented.func; + + This function allows formatting an IntlCalendar or + DateTime object without first explicitly creating a + IntlDateFormatter object. + + + The temporary IntlDateFormatter that will be created + will take the timezone from the passed in object. The timezone database + bundled with PHP will not be used – ICU's will be used instead. The timezone + identifier used in DateTime objects must therefore + also exist in ICU's database. + @@ -41,7 +52,9 @@ object - + An object of type IntlCalendar or + DateTime. The timezone information in the object + will be used. @@ -49,7 +62,17 @@ format - + How to format the date/time. This can either be an array with + two elements (first the date style, then the time style, these being one + of the constants IntlDateFormatter::NONE, + IntlDateFormatter::SHORT, + IntlDateFormatter::MEDIUM, + IntlDateFormatter::LONG, + IntlDateFormatter::FULL), a long with + the value of one of these constants (in which case it will be used both + for the time and the date) or a string with the format + described in the ICU + documentation. If &null;, the default style will be used. @@ -57,7 +80,8 @@ locale - + The locale to use, or &null; to use the default one. @@ -67,11 +91,72 @@ &reftitle.returnvalues; - + A string with result&return.falseforfailure;. + + &reftitle.examples; + + + <function>IntlDateFormatter::formatObject</function> examples + + + + &example.outputs; + + + + + + +