Carsten Brandt
cdb7d84fea
added support for non-gregorian calendar to formatter
...
fixes #8687
close #10517
9 years ago
SilverFire - Dima Naumenko
b5d95f845e
`Formatter::asDuration()` PHPDoc and PHPUnit test enhanced
9 years ago
John Was
928a02c3bc
Added `Formatter::asDuration()` method
9 years ago
Alexander Makarov
1b3770fd21
Use === instead of == where possible
9 years ago
Alexander Makarov
4ecafe653c
More compact number operations
9 years ago
Alexander Makarov
5ab4f0f090
Better quotes usage in strings
...
- Use single quote where interpolation isn't necessary
- Use interpolation when it's better than concatenation
9 years ago
jeicd
0407407b76
fix coding style to follow PSR-2
9 years ago
Alexandr
ded75253ca
Change 'de' to 'en' in comments of Formatter.php
9 years ago
Carsten Brandt
60af9d07fb
proper fix and changelog for #9108
...
close #9437
fixes #9108
9 years ago
nxnx
b562b50658
fix #9108 ( Negative number results in no formatting when using asSize or asShortSize )
9 years ago
Carsten Brandt
6d9fe671de
various code style and whitespace adjustments
9 years ago
Carsten Brandt
3c9c6b5d7d
fixed formatter to accept explicit setting of decimal numbers
...
this version keeps BC for symbols while fixing the issue with decimals.
fixes #8684
9 years ago
MaXL
17d8649509
Fix phpdoc typo
...
Change property type from array to integer for $sizeFormatBase in i18n/Formatter
9 years ago
Alexander Mohorev
38ca276e1f
PSR-2 try-catch statement
9 years ago
Carsten Brandt
3c2bd76236
allow negative dates for date formatter
...
fixes #8451
10 years ago
Carsten Brandt
543daf099f
Added Formatter:$numberFormatterSymbols
...
this allows to specify custom symbols such as currency symbol.
also improved error reporting in case intl fails
fixes #7915 , close #7920
10 years ago
Carsten Brandt
95cdd0905d
fix case in asDatetime method references
...
close #7095
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
Alexander Makarov
c6b0e24a45
Fixes #6305 : `yii\i18n\Formatter::asParagraphs()` was not unicode-aware
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
8b79293ff2
added missing `@since` annotations
10 years ago
Carsten Brandt
6a8f4b0e50
fixed date formatter to display date-only values correctly
...
fixes #5448
10 years ago
Carsten Brandt
c2d814cc3a
first draft of a fix for #5448
...
only method stubs so far
10 years ago
Alexander Mohorev
e92482f554
Typo in word
10 years ago
Carsten Brandt
8039026ae2
added Formatter::defaultTimeZone to allow non UTC-values in DB
...
fixes #5683
10 years ago
Alexander Mohorev
f1edafffaf
PHPDoc comment doesn't contain all necessary @throws tag
...
close #5762
10 years ago
Alexander Makarov
49760b64dd
Fixes #5595 : Better phpdoc value types for Formatter methods
10 years ago
Alexander Makarov
02622b6fe4
phpdoc fixes and additions
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
1b052f3e94
updated formatter docs and allow using DateTimeImmutable
...
see http://derickrethans.nl/immutable-datetime.html
by @derickr
10 years ago
Carsten Brandt
dfd68954a5
finished guide on formatting
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
0818c9bbfc
do not override config when intl is not installed
...
fixes #5260
10 years ago
Carsten Brandt
6267b9ee1a
Fixed issue with timezone conversion in formatter
...
related to #5128
10 years ago
Qiang Xue
d2b864da84
prepare for 2.0.0-rc release.
10 years ago
Carsten Brandt
f6ef6c978f
fixed crash of Formatter when intl is not installed
...
related to #5214
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
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
0723f409ab
finished the first structure of the guide on formatting
10 years ago
Carsten Brandt
c8f8f654ce
fixed paragraph formatting
10 years ago
Carsten Brandt
d82195706f
UPGRADE and CHANGELOG notes for the Formatter changes
10 years ago
Carsten Brandt
47648a4b9f
final cleanup
10 years ago