mirror of
https://github.com/archtechx/money.git
synced 2025-12-12 11:24:03 +00:00
Apply text suggestions from code review
Co-authored-by: Samuel Štancl <samuel@archte.ch>
This commit is contained in:
parent
a8d32a0be8
commit
96786939bd
1 changed files with 3 additions and 3 deletions
|
|
@ -166,13 +166,13 @@ $money = Money::fromDecimal(40.25, USD::class);
|
|||
$money->formatted(['decimalSeparator' => ',', 'prefix' => '$ ', 'suffix' => ' USD']);
|
||||
```
|
||||
|
||||
There is also a `->rawFormatted()` if you wish to use [math decimals](#math-decimals) instead of [display decimals](#display-decimals).
|
||||
There's also `->rawFormatted()` if you wish to use [math decimals](#math-decimals) instead of [display decimals](#display-decimals).
|
||||
```php
|
||||
$money = Money::new(123456, CZK::class);
|
||||
$money->rawFormatted(); // 1 235,56 Kč
|
||||
$money->rawFormatted(); // 1 234,56 Kč
|
||||
```
|
||||
|
||||
And converting the formatted value back to the Money instance is also possible. The package tries to extract the currency from the provided string.
|
||||
Converting the formatted value back to the `Money` instance is also possible. The package tries to extract the currency from the provided string:
|
||||
```php
|
||||
$money = money(1000);
|
||||
$formatted = $money->formatted(); // $10.00
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue