Skip to content

Commit

Permalink
Fix basic usage examples
Browse files Browse the repository at this point in the history
  • Loading branch information
damienalexandre authored Jan 8, 2024
1 parent 60e2dd4 commit 429fd4e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,22 @@ use FriendsOfPhp\Number\Number;
echo Number::format(1234567.89); // 1,234,567.89

// Spell out a number
echo Number::format(1234567.89); // one thousand two hundred thirty-four
echo Number::spell(1234567.89); // one thousand two hundred thirty-four

// Get the ordinal form of a number
echo Number::format(1234567.89); // 42nd
echo Number::ordinal(1234567.89); // 42nd

// Format a number as a percentage
echo Number::format(1234567.89); // 1%
echo Number::percentage(1234567.89); // 1%

// Format a number as currency
echo Number::format(1234567.89); // €1,234.56
echo Number::currency(1234567.89, 'EUR'); // €1,234.56

// Format file size
echo Number::format(1234567.89); // 1 KB
echo Number::fileSize(1234567.89); // 1 KB

// Get a human-readable representation of a number
echo Number::format(1234567.89); // 1 million
echo Number::forHumans(1234567.89); // 1 million
```

### Advanced usage
Expand Down

0 comments on commit 429fd4e

Please sign in to comment.