Closed johankristiansson closed 4 years ago
This is the docs for this function. I guess the same is true for Format.getUnitFormat(unit)
then?
The docs seem out of sync with the impl. It already takes two params.
Ah, I see now there is an internal function called getUnitsPerQuantity
here which is what this issue is about. I changed the title since I thought it was the public function, sorry about that :-).
Ok that makes sense to me. I think you can go ahead with a PR for that if you want. I would be great if you could reconcile the docs at the same time.
If you create your own unit of an existing quantity and a format for that unit you cannot use
Format.getUnitsForQuantity
since it assumes that you are using the native units.Example:
Instead it should accept a paramter of units, which could be defaulted to the native ones.