summaryrefslogtreecommitdiff
path: root/ext/intl/msgformat
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Merge branch '5.4'Gustavo André dos Santos Lopes2012-07-3014-0/+0
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | * 5.4: Fix test title and limit it to ICU >= 4.8 Remove executable bit from files Limit test to ICU 49 Remove executable bit from files
| * | Merge branch '5.3' into 5.4Gustavo André dos Santos Lopes2012-07-3014-0/+0
| |\ \ | | |/ | | | | | | | | | | | | * 5.3: Limit test to ICU 49 Remove executable bit from files
| | * Remove executable bit from filesGustavo André dos Santos Lopes2012-07-3014-0/+0
| | |
* | | Do not fetch default locale once on minit or rinitGustavo Lopes2012-07-233-3/+3
| | | | | | | | | | | | | | | The default locale is now requested to ICU when it's needed by using intl_get_default_locale().
* | | Merge branch 'datefmt_tz_cal_interop'Gustavo André dos Santos Lopes2012-07-221-74/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * datefmt_tz_cal_interop: Readded accidentally removed line Added IntlDateFormatter::formatObject(). Refactor Refactored internal_get_timestamp() Unified zval -> UDate conversions
| * | | Added IntlDateFormatter::formatObject(). RefactorGustavo André dos Santos Lopes2012-07-221-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | Unified zval -> UDate conversionsGustavo André dos Santos Lopes2012-07-021-66/+2
| | | | | | | | | | | | | | | | | | | | Now IntlDateFormatter::format() also accepts IntlCalendar objects. Code is shared in MessageFormatter and IntlDateFormatter.
* | | | Merge branch 'PHP-5.4'Felipe Pena2012-07-141-0/+1
|\ \ \ \ | | |/ / | |/| | | | | | | | | | * PHP-5.4: - Fixed bug #62564 (Extending MessageFormatter and adding property causes crash)
| * | | - Fixed bug #62564 (Extending MessageFormatter and adding property causes crash)Felipe Pena2012-07-141-0/+1
| | | |
* | | | Merge branch 'PHP-5.4'Xinchen Hui2012-06-077-5/+26
|\ \ \ \ | |/ / / | | / / | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | By Gustavo André dos Santos Lopes (4) and others via Felipe Pena (2) and Xinchen Hui (2) * PHP-5.4: Remove unused codes based on microsoft's description,the direct convert from FILETIME struct to __int64 is unsafe. merge 5.3 entries restore NEWS Fix ext/intl build on ICU < 4.8 Optimization in ext/intl/msgformat Fixed tests in ext/intl Changed XFAILed collator_get_sort_key.phpt
| * | Merge branch 'PHP-5.3' into PHP-5.4Xinchen Hui2012-06-077-5/+26
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By Gustavo André dos Santos Lopes (4) and others via Felipe Pena (1) and Xinchen Hui (1) * PHP-5.3: Remove unused codes based on microsoft's description,the direct convert from FILETIME struct to __int64 is unsafe. Fix ext/intl build on ICU < 4.8 Optimization in ext/intl/msgformat Fixed tests in ext/intl Changed XFAILed collator_get_sort_key.phpt
| | * Fix ext/intl build on ICU < 4.8Gustavo André dos Santos Lopes2012-06-061-0/+2
| | |
| | * Optimization in ext/intl/msgformatGustavo André dos Santos Lopes2012-06-067-5/+24
| | | | | | | | | | | | | | | Don't transform the string to make it apostrophe friendly in ICU 4.8+ as that it is now the default.
* | | DateFormat plays nice with Calendar, TimeZoneGustavo André dos Santos Lopes2012-06-041-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | MessageFormatter accepts IntlCalendar argumentsGustavo André dos Santos Lopes2012-05-171-0/+11
| | | | | | | | | | | | | | | Now MessageFormatter::format() accepts IntlCalendar objects to be used in arguments of type Format::kDate.
* | | Bug #58756: w.r.t MessageFormatter (partial fix)Gustavo André dos Santos Lopes2012-05-173-3/+60
| | | | | | | | | | | | | | | | | | | | | | | | I don't think the current ICU API allows this bug to be completely fixed. Right now, the code cannot control the time zone used in date/time formats that appear inside complex subformats. See the comment inside umsg_set_timezone().
* | | Keep date precision in MessageFormatter.Gustavo André dos Santos Lopes2012-05-131-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MessageFormatter::parse and MessageFormat::format (and their static equivalents) now don't throw away better than second precision in the arguments. It's already bad enough that in MessageFormatter and IntlDateFormatter we use seconds since epoch instead of milliseconds since epoch, deviating from the ICU date representations. But we don't need to throw away extra precision when parsing dates; we can keep the seconds since epoch convention and return non integer doubles with only a small BC impact. Note that we already could return doubles from MessageFormatter::parse if the date was sufficiently in the past or in the future.
* | | ICU < 4.8 compat in MessageFormatterGustavo André dos Santos Lopes2012-05-131-8/+128
| | | | | | | | | | | | | | | | | | Restricted support for named arguments to ICU 4.8+. Also added bound checks when converting arguments to Formattables.
* | | Don't check number of args in msgfmt_do_formatGustavo André dos Santos Lopes2012-05-131-11/+0
| | | | | | | | | | | | | | | | | | | | | The check does not work reliably across ICU versions when named arguments are added to the mix. For instance, for recent versions of ICU like 49, a pattern like "{foo,number} {foo}", has 0 returned from umsg_format_arg_count(), but for ICU 4.0, this returns 2.
* | | Better error messages in MessageFormatter::format.Gustavo André dos Santos Lopes2012-05-133-156/+224
| | |
* | | Accept numeric strings for dates.Gustavo André dos Santos Lopes2012-05-131-8/+41
| | | | | | | | | | | | Refactored umsg_helper_zval_to_millis in the process.
* | | Cache arguments type info in MessageFormatter.Gustavo André dos Santos Lopes2012-05-136-15/+35
| | |
* | | Set global error if insufficient numeric args. WS.Gustavo André dos Santos Lopes2012-05-132-11/+11
| | |
* | | Refactoring of patch for FR #61871.Gustavo André dos Santos Lopes2012-05-133-299/+321
| | |
* | | Orig patch for FR #61871 by David SklarGustavo André dos Santos Lopes2012-05-133-69/+318
| | |
* | | Merge branch 'PHP-5.4'Felipe Pena2012-04-231-0/+4
|\ \ \ | |/ / | | | | | | | | | * PHP-5.4: - Fixed bug #61829 (Memory leak when calling MessageFormatter's constructor twice)
| * | Merge branch 'PHP-5.3' into PHP-5.4Felipe Pena2012-04-231-0/+4
| |\ \ | | |/ | | | | | | | | | * PHP-5.3: - Fixed bug #61829 (Memory leak when calling MessageFormatter's constructor twice)
| | * - Fixed bug #61829 (Memory leak when calling MessageFormatter's constructor ↵Felipe Pena2012-04-231-0/+4
| | | | | | | | | | | | twice)
| | * - Added missing PHP_FE_END/ZEND_FE_ENDFelipe Pena2011-08-061-1/+1
| | |
| | * - Fixed possible efree(NULL) (bug #55296)Felipe Pena2011-08-042-2/+6
| | |
| | * Imlement clone for formatters that support itStanislav Malyshev2011-01-031-1/+25
| | | | | | | | | | | | | | | # also some test fixes, more to follow
| | * - Fixed bug #53612 (Segmentation fault when using several cloned intlGustavo André dos Santos Lopes2010-12-271-1/+6
| | | | | | | | | | | | | | | objects).
| * | - Added missing PHP_FE_END/ZEND_FE_ENDFelipe Pena2011-08-061-1/+1
| | |
| * | - Fixed possible efree(NULL) (bug #55296)Felipe Pena2011-08-042-2/+6
| | |
* | | Compatibility with old versions of ICU (4.0+).Gustavo André dos Santos Lopes2012-04-011-0/+3
| | |
* | | - Added missing PHP_FE_END/ZEND_FE_ENDFelipe Pena2011-08-061-1/+1
| | |
* | | - Fixed possible efree(NULL) (bug #55296)Felipe Pena2011-08-042-2/+6
|/ /
* | Imlement clone for formatters that support itStanislav Malyshev2011-01-031-1/+25
| | | | | | | | | | # also some test fixes, more to follow
* | - Fixed bug #53612 (Segmentation fault when using several cloned intlGustavo André dos Santos Lopes2010-12-271-1/+6
| | | | | | | | | | objects).
* | Remove main/php3_compat.h, for that a few references to `function_entry` haveJohannes Schlüter2010-03-301-1/+1
|/ | | | | to be replaced by `zend_function_entry`.
* Removed unused variableIlia Alshanetsky2009-04-271-1/+0
|
* Removed unused varsIlia Alshanetsky2009-04-221-2/+0
|
* - MFH: Added 'static' into ZEND_BEGIN_ARG_INFO_EX macroFelipe Pena2008-11-171-6/+0
|
* - Revert ZEND_BEGIN_ARG_INFO changeFelipe Pena2008-11-021-0/+6
|
* - MFH: Added 'static' into ZEND_BEGIN_ARG_INFO_EX macroFelipe Pena2008-10-241-6/+0
|
* Fix for pecl bug 14664 - problem with older gccEd Batutis2008-10-161-0/+1
|
* MFH:Felipe Pena2008-08-115-45/+78
| | | | | | | - Added arginfo - Fixed WS - Changed C++ comments to C comments
* - MFH: Fixed crash msgfmt_get_patternFelipe Pena2008-08-061-1/+1
|
* use correct locale checkStanislav Malyshev2008-07-221-1/+1
|
* typofixesStanislav Malyshev2008-07-222-2/+2
|