Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Nov 25, 2024

Conversation

joelstein
Copy link
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
12 checks passed
@joelstein
Copy link
Contributor Author

Thanks!

@shaedrich
Copy link
Contributor

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

@Rattone
Copy link
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