Carsten Brandt
2a19b3caa0
fixed whitespace in tests
10 years ago
Carsten Brandt
9415c7921d
date formatter fall back to PHP impl. to solve Y2K38 issue
...
formatting date and time values for years >=2038 or <=1901 is now possible also with intl extension is
installed. 32bit systems will fall back to the PHP implementation because intl uses a 32bit UNIX timestamp internally.
On a 64bit system the intl formatter is used in all cases if installed.
fixes #5577
10 years ago
Carsten Brandt
6e7dc26b38
added support for DateTimeImmutable to Formatter
...
fixes #5503
10 years ago
Carsten Brandt
ae1bd39377
adjusted missing return for fix #6263
10 years ago
Carsten Brandt
7325fdd7ed
better fix for #5448 not using customized DateTime class
...
fixes #6263 and has no problem with PHP Bug:
> it is a PHP bug: https://bugs.php.net/bug.php?id=45543
> Fixed in this commit: php/php-src@22dba2f#diff-7b738accc3d60f74c259da18588ddc5dL2996
>
> Fixed in PHP >5.4.26 and >5.5.10. http://3v4l.org/mlZX7
10 years ago
Carsten Brandt
41fca90cce
split formatter test
10 years ago
Carsten Brandt
6a8f4b0e50
fixed date formatter to display date-only values correctly
...
fixes #5448
10 years ago
Carsten Brandt
8039026ae2
added Formatter::defaultTimeZone to allow non UTC-values in DB
...
fixes #5683
10 years ago
Alexander Makarov
327dde72f4
Fixes #5467 : Added ability to pass HTML tag options to `asEmail()`, `asImage()` and `asUrl()` methods of `yii\i18n\Formatter`
10 years ago
Alexey Kolmakov
ce4bf84452
#5467 Allow pass options to Html:a in Formatter:asUrl
10 years ago
Carsten Brandt
dfc4de877f
ensure integer is formatted without fraction digits
...
fixes #5179
10 years ago
Serge Bezborodov
76ade0f6b0
Changed order of attributes setting in Formatter
...
close #5261
10 years ago
Carsten Brandt
2fbce2fa25
improved formatter test coverage
10 years ago
Carsten Brandt
e305f0842c
skip unsupported things on 32bit system
10 years ago
Carsten Brandt
6267b9ee1a
Fixed issue with timezone conversion in formatter
...
related to #5128
10 years ago
Carsten Brandt
3b0f561480
format timestamps with invalid date input
...
fixes #4989
10 years ago
Kartik Visweswaran
18b57af5ac
Better date parsing and formatting including 32 bit support
...
Enhances `normalizeDateTimeValue` to return a DateTime object instead of a converted double value, that fails. The DateTime object input is supported by 32 bit, 64 bit, as well as the `IntlDateFormatter` to format all years. (including fixing of the Y2K38 bug). Fixes issue in #4989 .
close #5000
10 years ago
Qiang Xue
d49957fe35
Fixes #5079 : added test case.
10 years ago
Carsten Brandt
3ff548a442
Refactored DateValidator to support ICU format
10 years ago
Carsten Brandt
9edf938bf1
Added tests for empty values
...
use "just now" for empty time difference in Formatter.
fixed wrong language name definition
10 years ago
Carsten Brandt
be655d4f39
extracted date format converting to a helper class
...
adding and reworking the conversion of:
- ICU to PHP
- PHP to ICU
- ICU to JUI
- PHP to JUI
10 years ago
Carsten Brandt
b5af2f6ab3
fixed size format plural rule to not format number itself
...
This fix ensures the format configured in the formatter class is used in the message instead
of the default ICU format.
fixes #4960
10 years ago
Carsten Brandt
c8f8f654ce
fixed paragraph formatting
10 years ago
Carsten Brandt
47648a4b9f
final cleanup
10 years ago
Carsten Brandt
3f75728083
refactored size format
10 years ago
Carsten Brandt
916d2c182d
ensure some BC
...
ensure some features that were recently added to formatter keep working after refactoring
10 years ago
Carsten Brandt
9418c9d236
unit tests and some locale depended fixes
10 years ago
Carsten Brandt
8d397e7f0e
finished currency formatter
10 years ago
Carsten Brandt
f8f0ff5445
moved formatter to i18n namespace
10 years ago
Carsten Brandt
62e7c3e9a6
fixed some inconsistnecies in HHVM tests
...
exclude parts that have different default values
10 years ago
Alexander Makarov
dde695cda4
Added GridView message check to FallbackMessageFormatterTest
10 years ago
Erik_r
299d991a2e
#2359 testcases adapted and compatibility to old tests improved
10 years ago
SonicGD
b5f8a4dc22
Reformat code te be PSR-2 compatible
11 years ago
AlexGx
32d0768919
style fixes with phpcs:yii2
11 years ago
Qiang Xue
203bc5ea05
Fixed test break.
11 years ago
Qiang Xue
9f37e133e3
Fixed test break.
11 years ago
Carsten Brandt
c229ba729a
fixed a bug in MessageSource and missingtranslation event
...
fixes #2519 : MessageSource removed translation messages when event handler
was bound to `missingTranslation`-event
11 years ago
Alexander Makarov
e539482d88
Added failing test for #2209
11 years ago
Alexander Makarov
1e602adb6e
- Fixed BaseFileHelper::localize docs.
...
- DbMessageSource now performs UNION ALL.
- Fixed message merging for php and po.
- Updated tests.
11 years ago
Carsten Brandt
b59b77cd4f
added timeZone property to i18n formatter
...
fixed #1021
11 years ago
Qiang Xue
1de06faa3b
Fixes #1253
11 years ago
Qiang Xue
d2e5f2c507
Fixes #1234 : use dash instead of underscore to separate language and country in locale id.
11 years ago
Carsten Brandt
a0b0d42b46
fixed message formatting for all the ICU versions
...
- refactored replaceNamedArguments.
- ensure gridview message works on all systems.
fixes #1072
11 years ago
Carsten Brandt
d637a76f56
add support for named arguments to messageformatter parse
11 years ago
Carsten Brandt
4d03699907
fixed fallback message format parameter order
11 years ago
Carsten Brandt
bcd1ad11a4
refactored MessageFormatter
11 years ago
Carsten Brandt
449eb84247
refactored message formatter
11 years ago
Alexander Makarov
ee2af2661c
Removed unneeded use statements
11 years ago
Carsten Brandt
750267a821
fix tests when intl is not installed
11 years ago
Carsten Brandt
5b9b97276e
implemented plural and select for fallback intl message formatter
11 years ago