Erkan Karataş
aaedd200b0
Formatter asDatetime() documentation $format fix ( #14708 )
...
In the description asDatetime() function about the $format parameter it says that the default value is taken from $dateFormat while the correct is $datetimeFormat
2017-08-23 09:44:05 +02:00
SilverFire - Dmitry Naumenko
0e2b6c41b8
Simplified API of Formatter::asWeight() and Formatter::asLength() methods
2017-08-21 13:10:19 +03:00
Robert Korulczyk
5a8c3d537b
Enable phpdoc_summary rule in php-cs-fixer config ( #14675 )
...
* Enable `phpdoc_summary` rule in php-cs-fixer config.
* Fix case in "PHPDoc".
2017-08-21 11:19:35 +02:00
Robert Korulczyk
1501c659ac
Add empty lines before return statements. ( #14682 ) [skip ci]
2017-08-21 01:58:49 +03:00
Robert Korulczyk
b99e955627
Fix CS ( #14665 )
...
* Run php-cs-fixer.
* Enable phpdoc_types rule.
2017-08-18 12:10:42 +02:00
SilverFire - Dmitry Naumenko
b9f582dbf3
Try to fix tests on Travis
2017-08-16 08:04:35 +03:00
SilverFire - Dmitry Naumenko
7c73b0b79d
Enhanced tests, updated CHNAGELOG
2017-08-15 23:13:59 +03:00
SilverFire - Dmitry Naumenko
b577e302f7
Enhanced PHPDocs, added tests
2017-08-14 23:48:33 +03:00
SilverFire - Dmitry Naumenko
4028c69ed5
Merge branch 'master' into nineinchnick-9703-si-formatters
...
Conflicts:
framework/i18n/Formatter.php
2017-08-14 22:55:45 +03:00
bscheshirwork
0c0cc1074d
fix current time in formatter ( #14203 )
...
* fix current time in formatter
* expand testAsDatetime
* Update FormatterDateTest.php
* Update CHANGELOG.md
2017-08-03 10:20:37 +02:00
Robert Korulczyk
fe8a0a6a2e
Enable no_useless_else rule in php-cs-fixer ( #14420 )
2017-07-10 11:26:21 +03:00
Carsten Brandt
fadeb5d2b4
added formatter as second paramter to format closure
...
to allow reusing the formatter in custom formats.
fixes #4495
addition to #14326
2017-07-03 11:34:20 +02:00
Elvira Sheina
aca7390a47
Added closure support in yii\i18n\Formatter #4495 ( #14326 )
2017-07-03 11:11:35 +02:00
Robert Korulczyk
ba0ab403b5
Added php-cs-fixer coding standards validation to Travis CI ( #14100 )
...
* php-cs-fixer: PSR2 rule.
* php-cs-fixer: PSR2 rule - fix views.
* Travis setup refactoring.
* Add php-cs-fixer to travis cs tests.
* Fix tests on hhvm-3.12
* improve travis config
* composer update
* revert composer update
* improve travis config
* Fix CS.
* Extract config to separate classes.
* Extract config to separate classes.
* Add file header.
* Force short array syntax.
* binary_operator_spaces fixer
* Fix broken tests
* cast_spaces fixer
* concat_space fixer
* dir_constant fixer
* ereg_to_preg fixer
* function_typehint_space fixer
* hash_to_slash_comment fixer
* is_null fixer
* linebreak_after_opening_tag fixer
* lowercase_cast fixer
* magic_constant_casing fixer
* modernize_types_casting fixer
* native_function_casing fixer
* new_with_braces fixer
* no_alias_functions fixer
* no_blank_lines_after_class_opening fixer
* no_blank_lines_after_phpdoc fixer
* no_empty_comment fixer
* no_empty_phpdoc fixer
* no_empty_statement fixer
* no_extra_consecutive_blank_lines fixer
* no_leading_import_slash fixer
* no_leading_namespace_whitespace fixer
* no_mixed_echo_print fixer
* no_multiline_whitespace_around_double_arrow fixer
* no_multiline_whitespace_before_semicolons fixer
* no_php4_constructor fixer
* no_short_bool_cast fixer
* no_singleline_whitespace_before_semicolons fixer
* no_spaces_around_offset fixer
* no_trailing_comma_in_list_call fixer
* no_trailing_comma_in_singleline_array fixer
* no_unneeded_control_parentheses fixer
* no_unused_imports fixer
* no_useless_return fixer
* no_whitespace_before_comma_in_array fixer
* no_whitespace_in_blank_line fixer
* not_operator_with_successor_space fixer
* object_operator_without_whitespace fixer
* ordered_imports fixer
* php_unit_construct fixer
* php_unit_dedicate_assert fixer
* php_unit_fqcn_annotation fixer
* phpdoc_indent fixer
* phpdoc_no_access fixer
* phpdoc_no_empty_return fixer
* phpdoc_no_package fixer
* phpdoc_no_useless_inheritdoc fixer
* Fix broken tests
* phpdoc_return_self_reference fixer
* phpdoc_single_line_var_spacing fixer
* phpdoc_single_line_var_spacing fixer
* phpdoc_to_comment fixer
* phpdoc_trim fixer
* phpdoc_var_without_name fixer
* psr4 fixer
* self_accessor fixer
* short_scalar_cast fixer
* single_blank_line_before_namespace fixer
* single_quote fixer
* standardize_not_equals fixer
* ternary_operator_spaces fixer
* trailing_comma_in_multiline_array fixer
* trim_array_spaces fixer
* protected_to_private fixer
* unary_operator_spaces fixer
* whitespace_after_comma_in_array fixer
* `parent::setRules()` -> `$this->setRules()`
* blank_line_after_opening_tag fixer
* Update finder config.
* Revert changes for YiiRequirementChecker.
* Fix array formatting.
* Add missing import.
* Fix CS for new code merged from master.
* Fix some indentation issues.
2017-06-12 12:25:45 +03:00
Carsten Brandt
b056dff031
improved formatter documentation
2017-06-06 11:43:51 +02:00
Brandon Kelly
981346cb1e
Fixed Formatter::normalizeDatetimeValue() docs
...
There was a reference to `$checkTimeInfo` that was leftover from 54278fc842
2017-06-05 14:07:03 -07:00
Taras Gudz
18bc835243
Typo ( #14117 ) [skip ci]
2017-05-05 17:06:46 +03:00
Nikolay Oleynikov
323568c2e9
Remove trailing spaces from sources and tests ( #13621 ) [skip ci]
2017-02-19 17:34:22 +03:00
Bizley
54278fc842
asTime fixed for time-only values
...
close #13348
fixes #13343
2017-02-16 16:07:52 +01:00
a.kompaniets
50f3012f68
fixed currency format with custom decimal fraction
...
fixes #12345
close #12648
2017-01-03 00:03:40 +01:00
Carsten Brandt
b4b2b0e6d1
better docs about decimal numbers in Formatter
...
fixes #12520
2016-12-20 01:23:00 +01:00
Anton Kozlov
20a411d8ab
Fixed #12822 : Fixed datetime creation from microseconds, added tests to \i18n\Formatter::asTimestamp
2016-11-13 18:02:54 +02:00
Robert Korulczyk
7a3a342127
Fix errors reported by apidoc extension. ( #12986 )
2016-11-13 14:51:21 +01:00
Robert Korulczyk
4aa935e69e
Fixes #12055 : Changed boolean to bool and integer to int in phpdoc
2016-11-07 02:51:39 +03:00
Carsten Brandt
469c0548b6
fixed formatter to respect grouping separator for currency format
...
fixes #12331
2016-08-25 20:29:50 +02:00
Nikola Kovacs
43fddc74c9
remove unnecessary gettimeofday system call
...
close #9628
2016-07-04 12:41:58 +02:00
Nikola Kovacs
9d327baa8b
coding style fixes
2016-05-26 11:19:32 +02:00
Robbert Jan van de Velde
c7f365910d
Fixed handling of intervals of 0 seconds in yii\i18n\Formatter::asDuration().
...
Added unit tests for handling 0 second intervals and numeric values for yii\i18n\Formatter::asDuration().
Closes #11038
2016-03-08 15:12:08 +02:00
SilverFire - Dmitry Naumenko
1ff847142d
Optimized Formatter::formatSizeNumber() - used normalizeNumericValue()
2016-01-19 00:41:39 +02:00
SilverFire - Dmitry Naumenko
56a035ef6c
Merge branch 'patch-1' of https://github.com/necrox87/yii2 into necrox87-patch-1
2016-01-19 00:33:41 +02:00
Carsten Brandt
cdb7d84fea
added support for non-gregorian calendar to formatter
...
fixes #8687
close #10517
2016-01-02 19:42:35 +01:00
Jan Was
69e36fa86c
Merge branch 'master' into 9703-si-formatters
2015-12-03 10:45:52 +01:00
Marco Germani
5747557794
Update Formatter.php
...
In according with the open discussion
2015-11-20 22:45:38 +01:00
Marco Germani
53593c8ec3
Update Formatter.php
...
string type are cast to integer and have rapresentation of 2147483647 using float type instead for represent larger numbers
2015-10-27 15:48:13 +01:00
SilverFire - Dima Naumenko
b5d95f845e
Formatter::asDuration() PHPDoc and PHPUnit test enhanced
2015-10-26 23:57:05 +02:00
John Was
928a02c3bc
Added Formatter::asDuration() method
2015-10-26 20:48:39 +02:00
Alexander Makarov
1b3770fd21
Use === instead of == where possible
2015-10-10 01:04:35 +03:00
Alexander Makarov
4ecafe653c
More compact number operations
2015-10-10 00:41:54 +03:00
Alexander Makarov
5ab4f0f090
Better quotes usage in strings
...
- Use single quote where interpolation isn't necessary
- Use interpolation when it's better than concatenation
2015-10-10 00:23:52 +03:00
jeicd
0407407b76
fix coding style to follow PSR-2
2015-10-05 13:58:47 +06:00
John Was
ac8d185539
cache ResourceBundle and created messages; fix unit divisor
2015-09-21 18:20:23 +02:00
John Was
4d3c211e24
use unit translations from ResourceBundle
2015-09-21 17:34:24 +02:00
John Was
504c85c9fd
updated phpdocs
2015-09-20 13:44:27 +02:00
John Was
705f544045
add imperial system to length and weight formatters and switch base unit to SI units
2015-09-20 13:37:21 +02:00
Alexandr
ded75253ca
Change 'de' to 'en' in comments of Formatter.php
2015-09-18 02:16:17 +07:00
John Was
d36a8779d7
added length and weight formatters
2015-09-17 08:26:17 +02:00
Carsten Brandt
60af9d07fb
proper fix and changelog for #9108
...
close #9437
fixes #9108
2015-08-16 23:16:29 +02:00
nxnx
b562b50658
fix #9108 ( Negative number results in no formatting when using asSize or asShortSize )
2015-08-16 22:39:50 +02:00
Carsten Brandt
6d9fe671de
various code style and whitespace adjustments
2015-08-02 00:27:19 +02:00
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
2015-07-26 01:35:42 +02:00