summaryrefslogtreecommitdiff
path: root/ext/intl/timezone/timezone_class.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'PHP-7.0' into PHP-7.1Derick Rethans2017-08-161-2/+2
|\
| * Revert "Upgrade timelib to 2017.05beta7"Derick Rethans2017-08-161-2/+2
| | | | | | | | This reverts commit bdd56f31078bf1f34341943603cf6aaa72e0db5c.
| * Upgrade timelib to 2017.05beta7Derick Rethans2017-08-151-2/+2
| |
* | 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
|
* Initial checkin of calendar/timezone code.Gustavo André dos Santos Lopes2012-04-011-0/+440