Enable users switching between the two on the input form
http://drupal.org/project/unitsapi

Comments

crea’s picture

Status: Active » Closed (won't fix)

I think it doesn't make sense to implement in generic module such as Units. Units module supports any kind of units and US and EU formats apply only to some of them.

crea’s picture

Title: Switch between US and EU formats » Support for unit conversions and different unit systems
Status: Closed (won't fix) » Active

Hmmm, actually it would make sense, if MVF started to support unit conversions. Now MVF treats all units as separate, and to support EU and US formats it would have to know how different unit types relate to each other, and to convert values if needed.
Problem is I don't need it myself so unless someone provides a patch or willing to sponsor it won't be implemented. It could also become complicated very fast.

crea’s picture

Component: User interface » Code
crea’s picture

Title: Support for unit conversions and different unit systems » Support of unit conversions and different unit systems
ailgm’s picture

We'd find support for conversions useful too. The issues for us are related to the display and search of these values. It's fine to store them with the original value / unit. But then another user will want to see them converted to the unit (or units) that they're comfortable with, and also want to search them in that other unit.

Re the display of values (on nodes / views / etc.), it would be most useful if the (display) unit of a field could be chosen by the user, the value displayed changed immediately there, and the choice for that field be remembered, so it is also used when the next field of the same type is displayed, say on another node). Alternatively, a click on the field could pop up a display of the value converted to the various equivalents). Whichever way is chosen, enabling this could be an option for the field.

Related to this second aspect, I've added a feature request of MVF's in the Range Search for Faceted Search module (see http://drupal.org/node/736122).

Thanks for your work on this module.

superxain’s picture

I need this feature.

I use this module to store the weight information of items. It would be nice if users can:

  • fill the weight value like 123g or 23.4oz
  • values are stored into database after converting to a fixed basic unit(i.e. g). So, the items can easily be sorted by it's weight
  • the weight value should be processed before being showed to users, and the processing has two jobs:
    1. switching the value to an unit system (g or oz) that users prefer.
    2. picking up the best unit from the unit system (for example, don't show 123456g, show 123.46kg)
  • Units API ( http://drupal.org/project/unitsapi ) can covert between units.

    thx for the module.

bucefal91’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

The 6.x version is no longer supported, unfortunately.