History log of /PHP_TRUNK/ext/intl/calendar/calendar_methods.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3234480 27-Aug-2014 Anatol Belski <ab@php.net> first show to make 's' work with size_t
c3e3c98 25-Aug-2014 Anatol Belski <ab@php.net> master renames phase 1
888ef26 20-Aug-2014 Anatol Belski <ab@php.net> yet trivial fixes
063079b 19-Aug-2014 Anatol Belski <ab@php.net> ported ext/intl, bugfixes to go
63d3f0b 19-Aug-2014 Anatol Belski <ab@php.net> basic macro replacements, all at once
3c4e64d 08-Jul-2014 Dmitry Stogov <dmitry@zend.com> Fixed IntlCalendar::toDateTime()
a94ec14 29-Jun-2014 Xinchen Hui <laruence@php.net> Fixed retval with zend_call_method
e143702 28-Jun-2014 Xinchen Hui <laruence@php.net> Fixed segfault, segfault and segfault
b53bc5c 28-Jun-2014 Xinchen Hui <laruence@php.net> Fixed segfaults
b6e9c76 27-Jun-2014 Xinchen Hui <laruence@php.net> Refactoring ext/intl (only compilerable now, far to finish :<)
4fbaddb 27-Jun-2014 Xinchen Hui <laruence@php.net> Refactoring ext/intl (incompleted)
050d7e3 15-Apr-2014 Dmitry Stogov <dmitry@zend.com> Cleanup (1-st round)
d5979c8 20-Aug-2013 Christopher Jones <sixd@php.net> Reduce (some more) compile noise of 'unused variable' and 'may be used
uninitialized' warnings.
a4538a4 03-Jul-2013 Gustavo André dos Santos Lopes <cataphract@php.net> intl: add intlcal_set_minimal_days_in_first_week()

and IntlCalendar::setMinimalDaysInFirstWeek(). This one had slipped.
we had a ::getMinimalDaysInFirstWeek() but no way to change the value.
ee6522b 29-Jan-2013 Gustavo Lopes <glopes@nebm.ist.utl.pt> Write local err on intlcal_get_time_zone() failure
99e48d3 22-Jul-2012 Gustavo André dos Santos Lopes <cataphract@php.net> Merge branch 'datefmt_tz_cal_interop'

* datefmt_tz_cal_interop:
Readded accidentally removed line
Added IntlDateFormatter::formatObject(). Refactor
Refactored internal_get_timestamp()
Unified zval -> UDate conversions
2f0775b 22-Jul-2012 Gustavo André dos Santos Lopes <cataphract@php.net> 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

Some stuff was moved around and slighlt modified to allow for more code
9c5074a 25-Jun-2012 Gustavo André dos Santos Lopes <cataphract@php.net> Fix undeclared intl_locale_get_default()

This was causing segfaults at least in the resourcebundle

Also moved intl_locale_get_default() to a more central location
and fixed a constness warning in resourcebundle_ctor().
eb346ef 03-Jun-2012 Gustavo André dos Santos Lopes <cataphract@php.net> DateFormat plays nice with Calendar, TimeZone

The following changes were made:

* The IntlDateFormatter constructor now accepts the usual values
for its $timezone argument. This includes timezone identifiers,
IntlTimeZone objects, DateTimeZone objects and NULL. An empty
string is not accepted. An invalid time zone is no longer accepted
(it used to use UTC in this case).
* When NULL is passed to IntlDateFormatter, the time zone specified in
date.timezone is used instead of the ICU default.
* The IntlDateFormatter $calendar argument now accepts also an
IntlCalendar. In this case, IntlDateFormatter::getCalendar() will
return false.
* The time zone passed to the IntlDateFormatter is ignored if it is
NULL and if the calendar passed is an IntlCalendar object -- in this
case, the IntlCalendar time zone will be used instead. Otherwise,
the time zone specified in the $timezone argument is used instead.
* Added IntlDateFormatter::getCalendarObject(), which always returns
the IntlCalendar object that backs the DateFormat, even if a
constant was passed to the constructor, i.e., if an IntlCalendar
was not passed to the constructor.
* Added IntlDateFormatter::setTimeZone(). It accepts the usual values
for time zone arguments. If NULL is passed, the time zone of the
IntlDateFormatter WILL be overridden with the default time zone,
even if an IntlCalendar object was passed to the constructor.
* Added IntlDateFormatter::getTimeZone(), which returns the time zone
that's associated with the DateFormat.
* Depreacated IntlDateFormatter::setTimeZoneId() and made it an alias
for IntlDateFormatter::setTimeZone(), as the new ::setTimeZone()
also accepts plain identifiers, besides other types.
IntlDateFormatter::getTimeZoneId() is not deprecated however.
* IntlDateFormatter::setCalendar() with a constant passed should now
work correctly. This requires saving the requested locale to the
* Centralized the hacks required to avoid compilation disasters on
Windows due to some headers being included inside and outside of
extern "C" blocks.
82740ef 20-May-2012 Felipe Pena <felipensp@gmail.com> - Fixed build using g++ (which complains about jump that crosses initialization)
3a81f90 17-May-2012 Gustavo André dos Santos Lopes <cataphract@php.net> Added IntlCalendar::toDateTime()
887744f 17-May-2012 Gustavo André dos Santos Lopes <cataphract@php.net> Fixed bad DateTime construction state check
81278e1 06-Apr-2012 Gustavo André dos Santos Lopes <cataphract@php.net> Added IntlCalendar::fromDateTime()

IntlCalendar::fromDateTime(DateTime|string $dateTime[, string $locale)

If a string is given as the first argument, the method will try to
instantiate a new DateTime object and use that instead.
9a35d45 06-Apr-2012 Gustavo André dos Santos Lopes <cataphract@php.net> Accept DateTimeZone where time zones are expected.

Also unified timezone handling in IntlCalendar::setTimeZone()
to that in the IntlCalendar and IntlGregorianCalendar constructors.
95fbae8 01-Apr-2012 Gustavo André dos Santos Lopes <cataphract@php.net> Compatibility with old versions of ICU (4.0+).
d3a29c1 01-Apr-2012 Gustavo André dos Santos Lopes <cataphract@php.net> Supported Calendar methods new to ICU 49.
5e65205 01-Apr-2012 Gustavo André dos Santos Lopes <cataphract@php.net> Initial checkin of calendar/timezone code.