Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLDR-17298 Fix problem with unit exponents #4071

Merged
merged 4 commits into from
Sep 25, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions docs/ldml/tr35-general.md
Original file line number Diff line number Diff line change
Expand Up @@ -951,15 +951,18 @@ Some of the constraints reference data from the unitIdComponents in [Unit_Conver
</ul></td></tr>

<tr><td><a name='unit_constant' href='unit_constant'>unit_constant</a></td><td>:=</td>
<td>("1"[0-9]+ | [2-9][0-9]*)("e" ("1"[0-9]+ | [2-9][0-9]*))?
<td>[1-9][0-9]* ("e" [1-9][0-9]*)?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will allow "1" in "per-1" . Is that ok?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is disallowed by the constraint below.

<ul><li><em>Examples:</em>
<ul><li>kilowatt-hour-per-100-kilometer</li>
<li>gallon-per-100-mile</li>
<li>per-200-pound</li>
<li>per-12</li>
</ul></li>
<li><em>Note:</em> The number is an integer greater than one.</li>
<li><em>Note:</em> The <code>e</code> notation is optional: per-100-kilometer and per-1e2-kilometer are equivalent unit_identifiers.</li>
<li><em>Constraint:</em> The number must be an integer greater than one.</li>
<li><em>Note:</em> The normal interpretation of e is used, where 2e6 = 2×10⁶</li>
<li><em>Note:</em> The <code>e</code> notation is optional: per-100-kilometer and per-1e2-kilometer are equivalent unit_identifiers.
However, for clarity the exponents should be greater than 3 and multiples of 3.
</li>
</ul></td></tr>

<tr><td><a name='dimensionality_prefix' href='dimensionality_prefix'>dimensionality_prefix</a></td><td>:=</td>
Expand Down
Loading