Skip to content

Add Number::spellOrdinal() to spell ordinals as words.#53661

Merged
taylorotwell merged 3 commits intolaravel:11.xfrom
joelstein:joelstein-patch-1
Nov 25, 2024
Merged

Add Number::spellOrdinal() to spell ordinals as words.#53661
taylorotwell merged 3 commits intolaravel:11.xfrom
joelstein:joelstein-patch-1

Conversation

@joelstein
Copy link
Copy Markdown
Contributor

Here's another Number facade helper, a combination of Number::spell and Number::ordinal.

So you can do things like this:

$title = 'The ' . Number::spellOrdinal(47) . ' president is Donald Trump';

// The forty-seventh president is Donald Trump

@taylorotwell taylorotwell merged commit 2c4efcb into laravel:11.x Nov 25, 2024
@joelstein
Copy link
Copy Markdown
Contributor Author

Thanks!

@shaedrich
Copy link
Copy Markdown
Contributor

Sorry, but I've proposed almost the exact same thing at the beginning of this month in #53379

@Rattone
Copy link
Copy Markdown
Contributor

Rattone commented Dec 7, 2024

Sorry, but I've proposed almost the exact same thing at the beginning of this month in #53379

Maybe you didn't use a convincing example...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants