Skip to content

Custom default QuantityFormat and UnitFormat #366

Open
@puigru

Description

@puigru

Currently, both Quantity#toString and Unit#toString default to a built-in formatter, SimpleQuantityFormat and SimpleUnitFormat.
I believe it would be useful to provide a way to set a custom formatter globally, especially for Quantity. Meaning any time a Quantity is converted to a String within the application it would use the provided formatter.

public String toString() {
return SimpleQuantityFormat.getInstance().format(this);
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions