summaryrefslogtreecommitdiff
path: root/ext/intl/timezone/timezone_class.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Generate ext/intl class entries from stubsMáté Kocsis2021-02-091-11/+2
| | | | Closes GH-6670
* Use true/false instead of TRUE/FALSE in intlNikita Popov2020-11-091-1/+1
| | | | And drop the U_DEFINE_TRUE_AND_FALSE flag.
* Add zend_call_known_function() API familyNikita Popov2020-06-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | This adds the following APIs: void zend_call_known_function( zend_function *fn, zend_object *object, zend_class_entry *called_scope, zval *retval_ptr, int param_count, zval *params); void zend_call_known_instance_method( zend_function *fn, zend_object *object, zval *retval_ptr, int param_count, zval *params); void zend_call_known_instance_method_with_0_params( zend_function *fn, zend_object *object, zval *retval_ptr); void zend_call_known_instance_method_with_1_params( zend_function *fn, zend_object *object, zval *retval_ptr, zval *param); void zend_call_known_instance_method_with_2_params( zend_function *fn, zend_object *object, zval *retval_ptr, zval *param1, zval *param2); These are used to perform a call if you already have the zend_function you want to call. zend_call_known_function() is the base API, the rest are just really thin wrappers around it for the common case of instance method calls. Closes GH-5692.
* Generate method entries for ext/intlMáté Kocsis2020-04-141-38/+1
| | | | Closes GH-5370
* Add a ZEND_UNCOMPARABLE valueNikita Popov2020-03-311-1/+1
| | | | | | To explicitly indicate that objects are uncomparable. For now this has no functional difference from the usual 1 return value, but makes intent clearer.
* Make error messages more consistent by fixing capitalizationMáté Kocsis2020-01-171-2/+2
| | | | Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
* Add stubs for IntlTimeZoneMáté Kocsis2019-11-041-93/+27
|
* Comparison cleanup:Dmitry Stogov2019-10-071-1/+4
| | | | | - introduce zend_compare() that returns -1,0,1 dirctly (without intermediate zval) - remove compare_objects() object handler, and keep only compare() handler
* Remove mention of PHP major version in Copyright headersGabriel Caruso2019-09-251-2/+0
| | | | Closes GH-4732.
* Merge branch 'PHP-7.4'Peter Kokot2019-07-131-1/+1
|\ | | | | | | | | * PHP-7.4: Convert all php_error_docref0 to php_error_docref
| * Convert all php_error_docref0 to php_error_docrefGeorge Peter Banyard2019-07-131-1/+1
| | | | | | | | Closes GH-4394
* | Merge branch 'PHP-7.4'Nikita Popov2019-06-051-1/+4
|\ \ | |/
| * Allow exceptions in __toString()Nikita Popov2019-06-051-1/+4
| | | | | | | | | | | | | | | | | | | | RFC: https://wiki.php.net/rfc/tostring_exceptions And convert some object to string conversion related recoverable fatal errors into Error exceptions. Improve exception safety of internal code performing string conversions.
* | Refactor zend_object_handlers API to pass zend_object* and zend_string* ↵Dmitry Stogov2019-02-041-6/+6
|/ | | | insted of zval(s).
* Require ICU ≥ 50.1Christoph M. Becker2018-09-151-10/+0
| | | | | | | | | | | | | | | | | Given that ICU is a set of lively developed libraries, that ICU 50.1 has been released on 2012-11-05, and PHP 7.4 is scheduled to be released seven years after it, we consider it appropriate to ditch these legacy versions. Particularly, that would be a reasonable groundwork to implement part two of the “Deprecate and remove INTL_IDNA_VARIANT_2003” RFC[1], namely to default idn_to_ascii()'s and idn_to_utf8()'s $variant parameter to INTL_IDNA_VARIANT_UTS46, which is not defined in ICU < 4.6. See also the related discussion on internals@[2]. [1] <https://wiki.php.net/rfc/deprecate-and-remove-intl_idna_variant_2003> [2] <http://news.php.net/php.internals/101626>ff
* Replace legacy zval_dtor() by zval_ptr_dtor_nogc() or even more specialized ↵Dmitry Stogov2018-07-041-7/+7
| | | | | | | destructors. zval_dtor() doesn't make a lot of sense in PHP-7.* and it's used incorrectly in some places. Its occurances should be replaced by zval_ptr_dtor() or zval_ptr_dtor_nogc(), or even more specialized destructors.
* Avoid magic method hash lookupsDmitry Stogov2018-07-021-1/+1
|
* Export standard object handlers, to avoid indirect accessDmitry Stogov2018-05-311-1/+1
|
* Simplify namespace accessAnatol Belski2018-04-011-1/+1
| | | | The icu namespace is an alias which resolves to the real namespace.
* Utilize the recommended way to handle the icu namespaceAnatol Belski2018-03-311-0/+2
|
* Move constants into read-only data segmentDmitry Stogov2017-12-141-1/+1
|
* Refactored array creation API. array_init() and array_init_size() are ↵Dmitry Stogov2017-09-201-2/+1
| | | | converted into macros calling zend_new_array(). They are not functions anymore and don't return any values.
* Merged PHP-7.0 by hand due to conflicts.Derick Rethans2017-08-151-2/+2
|
* Update IntlTimeZone methods for ICU 52Sara Golemon2016-04-181-0/+15
| | | | | | | | Adds: string IntlTimeZone::getWindowsID(string id) string IntlTimeZone::getIDForWindowsID(string winID[, string region]) And matching procedural functions
* Cleanup (avoid string reallocations)Dmitry Stogov2015-07-011-13/+8
|
* Use ZSTR_ API to access zend_string elements (this is just renaming without ↵Dmitry Stogov2015-06-301-1/+1
| | | | semantick changes).
* trailing whitespace removalStanislav Malyshev2015-01-101-7/+7
|
* cleanup intl typesStanislav Malyshev2014-12-291-2/+2
|
* first shot remove TSRMLS_* thingsAnatol Belski2014-12-131-43/+43
|
* s/PHP 5/PHP 7/Johannes Schlüter2014-09-191-1/+1
|
* master renames phase 1Anatol Belski2014-08-251-17/+17
|
* yet trivial fixesAnatol Belski2014-08-201-2/+2
|
* basic macro replacements, all at onceAnatol Belski2014-08-191-16/+16
|
* Fixed get_debug_infoXinchen Hui2014-06-281-11/+17
|
* Intl's codes are really need more careful :<Xinchen Hui2014-06-281-1/+1
|
* Fixed initialize of zvalXinchen Hui2014-06-281-1/+1
|
* Refactoring ext/intl (only compilerable now, far to finish :<)Xinchen Hui2014-06-281-3/+3
|
* Refactoring ext/intl (incompleted)Xinchen Hui2014-06-281-65/+58
|
* Cleanup (1-st round)Dmitry Stogov2014-04-151-1/+3
|
* Fixed cloning in ext/intl classes; master specificGustavo Lopes2012-08-261-1/+1
|
* Added IntlDateFormatter::formatObject(). RefactorGustavo André dos Santos Lopes2012-07-221-73/+2
| | | | | | | | | | | | | | | | | | | 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.
* DateFormat plays nice with Calendar, TimeZoneGustavo André dos Santos Lopes2012-06-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 constructor. * Centralized the hacks required to avoid compilation disasters on Windows due to some headers being included inside and outside of extern "C" blocks.
* Added private constructor to IntlTimeZone.Gustavo André dos Santos Lopes2012-06-031-0/+1
|
* Fixed write in constant memory.Gustavo André dos Santos Lopes2012-06-031-2/+2
| | | | clang did not forgive.
* Fixed problem in IntlCalendar debug handlerGustavo André dos Santos Lopes2012-05-251-2/+0
| | | | | | *is_temp was not being set. Also deleted a redundant assignment to *is_temp in IntlTimeZone.
* Fixed a couple of memory leaksGustavo André dos Santos Lopes2012-05-171-7/+12
|
* Added IntlTimeZone::fromDateTimeZone() and ::toDateTimeZone.Gustavo André dos Santos Lopes2012-05-171-2/+75
| | | | | | | | | | | | | | | | | | | | IntlTimeZone::fromDateTimeZone(DateTimeZone $dtz) converts from an ext/date TimeZone to an IntlTimeZone. The conversion is done by feeding the time zone name (essentially what would be given by DateTimeZone::getName()) to ICU's TimeZone::createTimeZone except if it's an offset time zone. In that case, the offset is read from the ext/date time zone object structure and an appopriate id (of the form GMT<+|-><HH:MM>) is given to ICU's TimeZone::createTimeZone. Not all ext/date time zones are recognized for ICU. For instance, WEST is not. Note that these kind of abbreviations, as far as I can tell, can only be created via ext/date DateTime, not directly through DateTimeZone's constructor. For IntlTimeZone::toDateTimeZone(), the behavior is symmetrical. We instantiate a DateTimeZone and then call its constructor if we don't have an offset time zone, otherwise we mess with its structure. If the timezone is not valid for ext/date, then we allow the exception of DateTimeZone constructor to propagate.
* Accept DateTimeZone where time zones are expected.Gustavo André dos Santos Lopes2012-05-171-9/+91
| | | | | Also unified timezone handling in IntlCalendar::setTimeZone() to that in the IntlCalendar and IntlGregorianCalendar constructors.
* Compatibility with old versions of ICU (4.0+).Gustavo André dos Santos Lopes2012-04-011-0/+9
|
* Added support for new method TimeZone::getUnknown() added in ICU 49.Gustavo André dos Santos Lopes2012-04-011-0/+3
|