PhpUnitsOfMeasure / php-units-of-measure

A library for handling physical quantities and the units of measure in which they're represented.
MIT License
305 stars 77 forks source link

Add support for Population #68

Closed pierpaolocira closed 7 years ago

pierpaolocira commented 7 years ago

Do you think it is possible to add the support for "Population" (in "Person")? I don't know if it is interesting, but can be useful to manage dataset containing information about this concept (often in MPerson). If you are interested I can open a pull request... Thank you

pierpaolocira commented 7 years ago

Ok, I know it can seems a bit "weird", but I think it can be really useful... as I said for datasets management, or for creating composite indicators (e.g. population over space, etc.). In any case I needed for both Population and Power and wrote the classes and made these 2 merge requests; these are independent, so you can decide to accept just one (instead of two or zero). Let me know. Thanks

triplepoint commented 7 years ago

Hi, thanks for your interest, and sorry about the wait.

I don't think we need Population as a separate unit of measure, given that we have a more generic Quantity that covers this from a strict unit of measure standpoint (though it could stand to have more units added, since "moles" is really only useful when you're talking about atoms).

Any application-specific use cases like this one should probably be kept either in the application itself, or if you find yourself using it a lot, in a separate library.

Thanks again for your submission.