Gustavo André dos Santos Lopes
0838a2b7c5
Merge branch '5.3' into 5.4
2012-05-23 15:52:32 +02:00
Gustavo André dos Santos Lopes
e08566c613
Fixed bug #62017
...
IntlDateFormatter constructor would release some resources
under certain error conditions.
2012-05-23 15:52:19 +02:00
Gustavo André dos Santos Lopes
70e3e627fe
Fixed several ext/intl tests
2012-05-23 14:49:01 +02:00
Gustavo André dos Santos Lopes
2eb069aa48
Merge branch '5.4'
2012-05-23 13:27:54 +02:00
Gustavo André dos Santos Lopes
8ee8ccda19
Merge branch '5.3' into 5.4
...
Conflicts:
sapi/fpm/fpm/fpm_main.c
2012-05-23 13:27:21 +02:00
Gustavo André dos Santos Lopes
1eff3b01b8
Fixed bug #6208 : memory leak in grapheme_extract()
2012-05-23 13:25:45 +02:00
Gustavo André dos Santos Lopes
86ea921291
Fixed bug #62082
...
This was a buffer overflow in internal function
get_icu_disp_value_src_php().
2012-05-23 13:25:42 +02:00
Gustavo André dos Santos Lopes
07c0d714a5
Fixed bug #62081
...
Constructor of IntlDateFormatter would leak if called twice.
Made calling it more than once error out before starting
using resources.
2012-05-23 13:25:37 +02:00
Gustavo André dos Santos Lopes
51286bd8e5
Fixed bug #62070
...
Collator::getSortKey() was returning an unterminated string
due the length given to RETURN_STRINGL being off by one.
2012-05-23 13:25:32 +02:00
Gustavo André dos Santos Lopes
3a81f90ebc
Added IntlCalendar::toDateTime()
2012-05-17 23:18:51 +02:00
Gustavo André dos Santos Lopes
887744f6b4
Fixed bad DateTime construction state check
2012-05-17 18:16:54 +02:00
Gustavo André dos Santos Lopes
ec23c3e540
MessageFormatter accepts IntlCalendar arguments
...
Now MessageFormatter::format() accepts IntlCalendar objects to be used in
arguments of type Format::kDate.
2012-05-17 17:57:37 +02:00
Gustavo André dos Santos Lopes
e9351b89a9
Bug #58756 : w.r.t MessageFormatter (partial fix)
...
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().
2012-05-17 17:57:01 +02:00
Gustavo André dos Santos Lopes
4cfd9995da
Added IntlTimeZone::fromDateTimeZone() and ::toDateTimeZone.
...
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.
2012-05-17 17:23:51 +02:00
Gustavo André dos Santos Lopes
22f4a30748
Fixed two IntlCalendar::setTimeZone() tests.
2012-05-17 17:23:50 +02:00
Gustavo André dos Santos Lopes
81278e1bbb
Added IntlCalendar::fromDateTime()
...
IntlCalendar::fromDateTime(DateTime|string $dateTime[, string $locale)
intlcal_from_date_time(...)
If a string is given as the first argument, the method will try to
instantiate a new DateTime object and use that instead.
2012-05-17 17:23:47 +02:00
Gustavo André dos Santos Lopes
9a35d45a5b
Accept DateTimeZone where time zones are expected.
...
Also unified timezone handling in IntlCalendar::setTimeZone()
to that in the IntlCalendar and IntlGregorianCalendar constructors.
2012-05-17 17:23:46 +02:00
Gustavo André dos Santos Lopes
ac33e40d2a
Keep date precision in MessageFormatter.
...
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.
2012-05-13 23:03:07 +02:00
Gustavo André dos Santos Lopes
53860672f3
ICU < 4.8 compat in MessageFormatter
...
Restricted support for named arguments to ICU 4.8+.
Also added bound checks when converting arguments to Formattables.
2012-05-13 20:55:02 +01:00
Gustavo André dos Santos Lopes
0295ed7d22
Added new MessageFormatter tests.
2012-05-13 20:53:06 +01:00
Gustavo André dos Santos Lopes
20dd5ccf19
Cache arguments type info in MessageFormatter.
2012-05-13 20:53:05 +01:00
Gustavo André dos Santos Lopes
407455876e
Set global error if insufficient numeric args. WS.
2012-05-13 20:53:05 +01:00
Gustavo André dos Santos Lopes
f1621485ad
Fixed MessageFormatter subformat tests.
2012-05-13 20:53:05 +01:00
Gustavo André dos Santos Lopes
c9b913b56b
Orig patch for FR #61871 by David Sklar
2012-05-13 20:51:43 +01:00
Stanislav Malyshev
71884b7024
Merge branch 'PHP-5.4'
...
* PHP-5.4:
Bug#59597 NumberFormatter::parse() with TYPE_INT64 results in a 32 bit integer
2012-04-19 11:37:55 -07:00
Stanislav Malyshev
106e0a2e68
Merge branch 'PHP-5.3' into PHP-5.4
...
* PHP-5.3:
Bug#59597 NumberFormatter::parse() with TYPE_INT64 results in a 32 bit integer
2012-04-19 11:37:31 -07:00
Stanislav Malyshev
5cbf2d6785
Merge branch 'pull-request/61' into PHP-5.3
...
* pull-request/61:
Bug#59597 NumberFormatter::parse() with TYPE_INT64 results in a 32 bit integer
2012-04-19 11:28:30 -07:00
Sherif Ramadan
2827324c7c
Bug#59597 NumberFormatter::parse() with TYPE_INT64 results in a 32 bit integer
2012-04-19 04:44:43 -04:00
Gustavo André dos Santos Lopes
d32ac3efc8
Fixed tests that required a "default" timezone.
...
Added date.timezone=Atlantic/Azores to all tests that were failing because
of ext/date warning about a timezone not having been set.
2012-04-01 23:28:01 +01:00
Gustavo André dos Santos Lopes
95fbae891a
Compatibility with old versions of ICU (4.0+).
2012-04-01 23:28:01 +01:00
Gustavo André dos Santos Lopes
69f75bb43c
Added support for new method TimeZone::getUnknown() added in ICU 49.
2012-04-01 23:28:00 +01:00
Gustavo André dos Santos Lopes
d3a29c108b
Supported Calendar methods new to ICU 49.
2012-04-01 23:28:00 +01:00
Gustavo André dos Santos Lopes
7460741f99
Fix TimeZone tests failing due to new data in ICU 49.
2012-04-01 23:28:00 +01:00
Gustavo André dos Santos Lopes
5e65205a8f
Initial checkin of calendar/timezone code.
2012-04-01 23:28:00 +01:00
Gustavo André dos Santos Lopes
ab627e0eb0
Convert EOL style to Unix.
2012-04-01 11:00:05 +02:00
Anatoliy Belsky
bd928f0592
Fix bug #61448 intl tests fail with icu >= 4.8
2012-03-28 15:07:01 +02:00
Anatoliy Belsky
a715a21594
Merge branch 'PHP-5.4'
...
* PHP-5.4:
Fix bug #61448 intl tests fail with icu >= 4.8
2012-03-28 14:53:28 +02:00
Anatoliy Belsky
105a9a9d45
Merge branch 'PHP-5.3' into PHP-5.4
...
* PHP-5.3:
Fix bug #61448 intl tests fail with icu >= 4.8
2012-03-28 14:01:14 +02:00
Anatoliy Belsky
103995ba22
Fix bug #61448 intl tests fail with icu >= 4.8
2012-03-28 13:59:51 +02:00
Stanislav Malyshev
d780b4e4b3
Merge branch 'PHP-5.4'
...
* PHP-5.4:
fix tests
2012-03-25 13:50:33 -07:00
Stanislav Malyshev
d51c1e0a4c
fix tests
2012-03-25 13:49:19 -07:00
Stanislav Malyshev
53c2f47a8f
Merge branch 'PHP-5.4'
...
* PHP-5.4:
fix bug #61487 - bad bounds check in grapheme_strpos
2012-03-25 01:03:43 -07:00
Stanislav Malyshev
2bd5fa0eda
Merge branch 'PHP-5.3' into PHP-5.4
...
* PHP-5.3:
fix bug #61487 - bad bounds check in grapheme_strpos
2012-03-25 01:03:25 -07:00
Stanislav Malyshev
cd9cd36d7e
fix bug #61487 - bad bounds check in grapheme_strpos
2012-03-25 00:56:38 -07:00
Rasmus Lerdorf
d00be8ce0b
Same thing here. "June 18, 1969 8:49:59 AM " does not contain a timezone, so there
...
is no way to know whether dst should be applied or not.
2012-02-05 10:35:56 +00:00
Rasmus Lerdorf
2500b7e5ba
Same thing here. "June 18, 1969 8:49:59 AM " does not contain a timezone, so there
...
is no way to know whether dst should be applied or not.
2012-02-05 10:35:56 +00:00
Rasmus Lerdorf
6659010dc9
Same thing here. "June 18, 1969 8:49:59 AM " does not contain a timezone, so there
...
is no way to know whether dst should be applied or not.
2012-02-05 10:35:56 +00:00
Rasmus Lerdorf
67fe1e2619
Without a timezone you can't know whether it is dst or not in this one
2012-02-05 10:29:34 +00:00
Rasmus Lerdorf
fe777cd4db
Without a timezone you can't know whether it is dst or not in this one
2012-02-05 10:29:34 +00:00
Rasmus Lerdorf
c5ec2f77dd
Without a timezone you can't know whether it is dst or not in this one
2012-02-05 10:29:34 +00:00