| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Constructor of IntlDateFormatter would leak if called twice.
Made calling it more than once error out before starting
using resources.
|
| | |
| | |
| | |
| | |
| | | |
Collator::getSortKey() was returning an unterminated string
due the length given to RETURN_STRINGL being off by one.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Now MessageFormatter::format() accepts IntlCalendar objects to be used in
arguments of type Format::kDate.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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().
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | | |
Also unified timezone handling in IntlCalendar::setTimeZone()
to that in the IntlCalendar and IntlGregorianCalendar constructors.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Restricted support for named arguments to ICU 4.8+.
Also added bound checks when converting arguments to Formattables.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Refactored umsg_helper_zval_to_millis in the process.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-5.4:
- Fixed bug #61829 (Memory leak when calling MessageFormatter's constructor twice)
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-5.3:
- Fixed bug #61829 (Memory leak when calling MessageFormatter's constructor twice)
|
| | |
| | |
| | |
| | | |
twice)
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-5.4:
Bug#59597 NumberFormatter::parse() with TYPE_INT64 results in a 32 bit integer
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-5.3:
Bug#59597 NumberFormatter::parse() with TYPE_INT64 results in a 32 bit integer
|
| | |\
| | | |
| | | |
| | | |
| | | | |
* pull-request/61:
Bug#59597 NumberFormatter::parse() with TYPE_INT64 results in a 32 bit integer
|
| | |/ |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Added date.timezone=Atlantic/Azores to all tests that were failing because
of ext/date warning about a timezone not having been set.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-5.4:
Fix bug #61448 intl tests fail with icu >= 4.8
|
| |\ \
| | | |
| | | |
| | | |
| | | | |
* PHP-5.3:
Fix bug #61448 intl tests fail with icu >= 4.8
|
| | |/ |
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-5.4:
fix tests
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-5.4:
fix bug #61487 - bad bounds check in grapheme_strpos
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-5.3:
fix bug #61487 - bad bounds check in grapheme_strpos
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
there
is no way to know whether dst should be applied or not.
|
| | | |
|