unitsofmeasurement/uom-systems

Name and symbol for UCUM units

Closed this issue · 3 comments

Hi,
Is there a reason why there is only some UCUM units with a name or symbol ?
How I can have a pretty print of all units for users.

Thanks for your work.

keilw commented

The UCUM system has a Print format for that. UCUMFormat_Print properties (also for the uom-se based module) contain all relevant "pretty print" strings according to the UCUM catalog. Is there a UCUM unit defined in the system right now, that you find was missing such a string? Some units are still to be defined and added, but we already have tickets like #59 for that.

Thanks for your help. I can now get a good print for user but is there a "UCUMFormat_Name" property for the name (according to UCUM column http://unitsofmeasure.org/ucum.html#iso1000 ) ? exemple for unit code "s" that will display "second"

keilw commented

At the moment the name is not rendered. It probably won't be parseable at all, since the Print variant is only for "pretty printing". One possible approach could be to extend the creation of UCUMFormat by using UnitStyle at least for the Print variant.