You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
minor #9543 rounding_mode for money type (syastrebov)
This PR was merged into the master branch.
Discussion
----------
rounding_mode for money type
Added docs for symfony/symfony#26767
Commits
-------
819d0a6 rounding_mode for money type
If a submitted number needs to be rounded (based on the `scale`_
7
+
option), you have several configurable options for that rounding. Each
8
+
option is a constant on the :class:`Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\NumberToLocalizedStringTransformer`:
9
+
10
+
* ``NumberToLocalizedStringTransformer::ROUND_DOWN`` Round towards zero.
11
+
12
+
* ``NumberToLocalizedStringTransformer::ROUND_FLOOR`` Round towards negative infinity.
13
+
14
+
* ``NumberToLocalizedStringTransformer::ROUND_UP`` Round away from zero.
15
+
16
+
* ``NumberToLocalizedStringTransformer::ROUND_CEILING`` Round towards positive infinity.
17
+
18
+
* ``NumberToLocalizedStringTransformer::ROUND_HALF_DOWN`` Round towards the "nearest neighbor". If both neighbors are equidistant, round down.
19
+
20
+
* ``NumberToLocalizedStringTransformer::ROUND_HALF_EVEN`` Round towards the "nearest neighbor". If both neighbors are equidistant, round towards the even neighbor.
21
+
22
+
* ``NumberToLocalizedStringTransformer::ROUND_HALF_UP`` Round towards the "nearest neighbor". If both neighbors are equidistant, round up.
0 commit comments