Contents

allowsFractionalUnits

A Boolean indicating whether non-integer units may be used for values.

Declaration

var allowsFractionalUnits: Bool { get set }

Discussion

Fractional units may be used when a value cannot be exactly represented using the available units. For example, if minutes are not allowed, the value “1h 30m” could be formatted as “1.5h”.

The default value of this property is false.

See Also

Configuring the Formatter Options