From 2f0775b999e7859275c614a3d2d8edd1506e0d68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustavo=20Andr=C3=A9=20dos=20Santos=20Lopes?= Date: Sun, 22 Jul 2012 03:54:03 +0200 Subject: Added IntlDateFormatter::formatObject(). Refactor To better support IntlCalendar, added this function: string IntlDateFormatter::formatObject(IntlCalendar|DateTime $obj [, array|int|string $format = null [, string $locale = null). $format is either of the constants IntlDateFormatter::FULL, etc., in which case this format applies to both the date and the time, an array in the form array($dateFormat, $timeFormat), or a string with the SimpleDateFormat pattern. This uses both the Calendar type and the timezone of the passed object to configure the formatter (a GregorianCalendar is forced for DateTime). Some stuff was moved around and slighlt modified to allow for more code reuse. --- ext/intl/timezone/timezone_methods.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ext/intl/timezone/timezone_methods.cpp') diff --git a/ext/intl/timezone/timezone_methods.cpp b/ext/intl/timezone/timezone_methods.cpp index 1435679fe7..c35f0b8721 100644 --- a/ext/intl/timezone/timezone_methods.cpp +++ b/ext/intl/timezone/timezone_methods.cpp @@ -24,6 +24,9 @@ #include #include #include "intl_convertcpp.h" + +#include "../common/common_date.h" + extern "C" { #define USE_TIMEZONE_POINTER 1 #include "timezone_class.h" -- cgit v1.2.1