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

Update thousand symbol to match SI/NIST standard lowercase #52533

Closed
wants to merge 342 commits into from
Closed

Update thousand symbol to match SI/NIST standard lowercase #52533

wants to merge 342 commits into from

Conversation

rabrowne85
Copy link

According to both SI and NIST standards the unit for thousand should be a lowercase k: NIST (see section Capitalization).

This updates the two functions to follow these standards.

I appreciate that there is a 'colloquial' variant for monetary and distance to use the uppercase K, e.g., $10K or a 10K run.

However, these are the exceptions and not the norm.

The use of the abbreviate() function currently precludes the use of something like: Number::abbreviate(10_000).'g'; or any other standard unit.

I couldn't find any reference to a previous discussion, so apologies if I missed something.

driesvints and others added 23 commits August 9, 2024 10:40
# Conflicts:
#	CHANGELOG.md
#	src/Illuminate/Foundation/Application.php
#	tests/Database/DatabaseConcernsHasAttributesTest.php
* add `testFromRemoveHeader`

* add `withoutHeaders`

* add `testFromRemoveHeaders`

* Update MakesHttpRequestsTest.php
…ass is left out of the message array (#52451)

* Account for anonymous function custom validation in the validator

Issue: #52437

* Revert changes in validator, adjust message formatter

When the message is an array, but the rule isn't set, it should default to $rule->message() rather than the array of messages

* move this test and adjust add the message array

* Add styleci recommendations

* stylceci also wanted some single quotes
#52465)

* Create Notification make command markdown name placeholder from Notification name

* fix code style

* formatting

---------

Co-authored-by: Taylor Otwell <[email protected]>
* Add `forceDestroy` to `SoftDeletes`

* Update Model.php

---------

Co-authored-by: Taylor Otwell <[email protected]>
* feat: Add clear stopping point for recursion

* style: fix styleci

* Update MySqlSchemaState.php

* Update DatabaseMySqlSchemaStateTest.php

* Update MySqlSchemaState.php

---------

Co-authored-by: Taylor Otwell <[email protected]>
* Run prepareNestedBatches on append/prependToChain

* Cleanup leftover import

* Update chain method

* Update Queueable.php

---------

Co-authored-by: Taylor Otwell <[email protected]>
* fix db:show with counts option

* fix db:table

* add more info

* formatting

* fix connection name and table size

* Update ShowCommand.php

---------

Co-authored-by: Taylor Otwell <[email protected]>
* Constrain key when asserting database has against a model

* Use already constrained database has methods

* Using a model instance that isn't saved to the database should fail
* Added `between` tests

* Added `between` assertion

* pint

* pint

* formatting

* min max

---------

Co-authored-by: Taylor Otwell <[email protected]>
* Adds asset prefetching strategies

* Formatting

* Rename config

* Use low fetch priority

* formatting

* formatting

---------

Co-authored-by: Taylor Otwell <[email protected]>
* feat: support attributes in `app()->call()`

* feat: support attributes in route dependencies resolution

* style: apply fixes from style-ci
* feat: make HigherOrderCollectionProxy generic via template types

* Add type tests for HigherOrderCollectionProxy
…search()` and `multisearch()` functions (#51669)

* Update PromptsAssertionTest.php

* Update ConfiguresPrompts.php

* Update PromptsAssertionTest.php

* Add tests for search and multisearch assertions

* Formatting

* Formatting

* Add `expectsSearch` method

---------

Co-authored-by: Jess Archer <[email protected]>
Copy link

Thanks for submitting a PR!

Note that draft PR's are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface.

Pull requests that are abandoned in draft may be closed due to inactivity.

Copy link
Member

@GrahamCampbell GrahamCampbell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we'd want this on master, as this is breaking.

@rabrowne85
Copy link
Author

I think we'd want this on master, as this is breaking.

that makes perfect sense - however, I'm just trying to figure out if there are other changes needed and if it's wanted. The units for billion and quintillion are also wrong. I'm also not sure you can chain the prefixes e.g., kP - still trying to get a confirmation out of the NIST/SI sites.

Wondering if the units should be set to the NIST/SI standard but have a way to provide your own to the abbreviate function and pass these down to the summarize function. Would love to get your thoughts on it 😄

@rabrowne85 rabrowne85 changed the base branch from 11.x to master August 20, 2024 12:10
@rabrowne85
Copy link
Author

On review I feel this function is about general numbers, e.g., Users, and not numbers with units, e.g., grams.

Having "we have 1B users" makes more sense than "we have 1G users".

As such I'm going to close this PR.

@rabrowne85 rabrowne85 closed this Aug 20, 2024
@rabrowne85 rabrowne85 deleted the patch-1 branch August 20, 2024 12:49
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.