Open sffc opened 3 weeks ago
I've been assuming option 2, largely because I've been thinking of precision as being tied to the larger unit. An argument in favor of option 1 might be the meter-and-centimeter
mixed unit used for person-heights in some locales; when creating a Measure using meter-and-centimeter
as unit
, it is likely more natural to give (for example) 180 instead of 1.80 for value
.
I think it semantically must be the largest unit. Otherwise, it would be Very Surprising if e.g. converting from foot
to foot-and-inch
would change the value.
why would it be surprising that converting to another unit would change the value? isn't that the primary purpose of converting to another unit?
Converting from foot
to foot-and-inch
may make sense if you want to format the non-whole-foot part of the value with inches, rather than fractional feet. And if you're doing that, it would be surprising if you didn't still have a value in feet at the end.
I think there are multiple mental models here, and both are valid.
One is:
"5 ft 10 in" is a nicer way of saying "70 in"
The other is:
"5 ft 10 in" is a nicer way of saying "5.833 ft"
Depending on which mental model you subscribe to, the answer to this question may differ.
(edited to make options 1 and 2 here line up with the OP)
My personal opinion: I tend to subscribe to the first mental model: "5 ft 10 in" is a more comprehensible version of "70 in". Evidence from context person-height:
Anecdotally, I have never heard anyone refer to height as "5 point something feet" or even "five-and-a-half feet".
One other advantage of using smallest-unit indexing is that digit display options make more sense. For example, if you say minimumFractionDigits: 2
, that can only refer to the smallest unit, since the larger units are always truncated to an integer.
To be clear, given those three options, "5.8333 feet" is the worst by a large margin.
I also agree that feet + inches is nicer than just inches, unless I'm measuring something :-)
Evidence from context person-height
On the other hand, consider degrees-and-arc-minutes-and-arc-seconds
.
In a mixed unit such as "foot-and-inch", in what unit should the scalar value be indexed?
Should 5 feet 10 inches be:
ICU internally does option 2, but I don't see that behavior discussed in UTS 35.
@macchiati @younies @ben-allen