From 7dbcc1b8b78233ee6c13c993327b4a655a1560be Mon Sep 17 00:00:00 2001 From: Romulo Cintra Date: Mon, 21 Feb 2022 11:04:51 +0100 Subject: [PATCH] update html for _roundingIncrement_ #81 --- out/numberformat/diff.html | 47 ++++++++++++++++++++++++++-------- out/numberformat/proposed.html | 2 +- 2 files changed, 38 insertions(+), 11 deletions(-) diff --git a/out/numberformat/diff.html b/out/numberformat/diff.html index abb4f01..a1229b3 100644 --- a/out/numberformat/diff.html +++ b/out/numberformat/diff.html @@ -976,16 +976,43 @@ emu-val { font-weight: bold; } -emu-alg ol, emu-alg ol ol ol ol { - list-style-type: decimal; -} - -emu-alg ol ol, emu-alg ol ol ol ol ol { - list-style-type: lower-alpha; -} -emu-alg ol ol ol, ol ol ol ol ol ol { - list-style-type: lower-roman; +/* depth 1 */ +emu-alg ol, +/* depth 4 */ +emu-alg ol ol ol ol, +emu-alg ol.nested-thrice, +emu-alg ol.nested-twice ol, +emu-alg ol.nested-once ol ol { + list-style-type: decimal; +} + +/* depth 2 */ +emu-alg ol ol, +emu-alg ol.nested-once, +/* depth 5 */ +emu-alg ol ol ol ol ol, +emu-alg ol.nested-four-times, +emu-alg ol.nested-thrice ol, +emu-alg ol.nested-twice ol ol, +emu-alg ol.nested-once ol ol ol { + list-style-type: lower-alpha; +} + +/* depth 3 */ +emu-alg ol ol ol, +emu-alg ol.nested-twice, +emu-alg ol.nested-once ol, +/* depth 6 */ +emu-alg ol ol ol ol ol ol, +emu-alg ol.nested-lots, +emu-alg ol.nested-four-times ol, +emu-alg ol.nested-thrice ol ol, +emu-alg ol.nested-twice ol ol ol, +emu-alg ol.nested-once ol ol ol ol, +/* depth 7+ */ +emu-alg ol.nested-lots ol { + list-style-type: lower-roman; } emu-eqn { @@ -1841,7 +1868,7 @@

1.1.2 InitializeNumberFormat ( numberFormat The following algorithm refers to the type nonterminal from UTS 35's Unicode Locale Identifier grammar.

-
  1. Let requestedLocales be ? CanonicalizeLocaleList(locales).
  2. Set options to ? CoerceOptionsToObject(options).
  3. Let opt be a new Record.
  4. Let matcher be ? GetOption(options, "localeMatcher", "string", « "lookup", "best fit" », "best fit").
  5. Set opt.[[localeMatcher]] to matcher.
  6. Let numberingSystem be ? GetOption(options, "numberingSystem", "string", undefined, undefined).
  7. If numberingSystem is not undefined, then
    1. If numberingSystem does not match the Unicode Locale Identifier type nonterminal, throw a RangeError exception.
  8. Set opt.[[nu]] to numberingSystem.
  9. Let localeData be %NumberFormat%.[[LocaleData]].
  10. Let r be ResolveLocale(%NumberFormat%.[[AvailableLocales]], requestedLocales, opt, %NumberFormat%.[[RelevantExtensionKeys]], localeData).
  11. Set numberFormat.[[Locale]] to r.[[locale]].
  12. Set numberFormat.[[DataLocale]] to r.[[dataLocale]].
  13. Set numberFormat.[[NumberingSystem]] to r.[[nu]].
  14. Perform ? SetNumberFormatUnitOptions(numberFormat, options).
  15. Let style be numberFormat.[[Style]].
  16. If style is "currency", then
    1. Let currency be numberFormat.[[Currency]].
    2. Let cDigits be CurrencyDigits(currency).
    3. Let mnfdDefault be cDigits.
    4. Let mxfdDefault be cDigits.
  17. Else,
    1. Let mnfdDefault be 0.
    2. If style is "percent", then
      1. Let mxfdDefault be 0.
    3. Else,
      1. Let mxfdDefault be 3.
  18. Let notation be ? GetOption(options, "notation", "string", « "standard", "scientific", "engineering", "compact" », "standard").
  19. Set numberFormat.[[Notation]] to notation.
  20. Perform ? SetNumberFormatDigitOptions(numberFormat, options, mnfdDefault, mxfdDefault, notation).
  21. Let roundingIncrement be ? GetNumberOption(options, "roundingIncrement", 1, 5000, 1).
  22. If roundingIncrement is not in « 1, 2, 5, 10, 20, 25, 50, 100, 200, 250, 500, 1000, 2000, 2500, 5000 », throw a RangeError exception.
  23. If roundingIncrement is not 1 and numberFormat.[[RoundingType]] is not fractionDigits, throw a RangeError exception.
  24. Set _numberFormat.[[RoundingIncrement]] to roundingIncrement.
  25. Let trailingZeroDisplay be ? GetOption(options, "trailingZeroDisplay", "string", « "auto", "stripIfInteger" », "auto").
  26. Set numberFormat.[[TrailingZeroDisplay]] to trailingZeroDisplay.
  27. Let compactDisplay be ? GetOption(options, "compactDisplay", "string", « "short", "long" », "short").
  28. Let defaultUseGrouping be "auto".
  29. If notation is "compact", then
    1. Set numberFormat.[[CompactDisplay]] to compactDisplay.
    2. Set defaultUseGrouping to "min2".
  30. Let useGrouping be ? GetStringOrBooleanOption(options, "useGrouping", "boolean", undefined, true « "min2", "auto", "always" », "always", false, defaultUseGrouping).
  31. Set numberFormat.[[UseGrouping]] to useGrouping.
  32. Let signDisplay be ? GetOption(options, "signDisplay", "string", « "auto", "never", "always", "exceptZero", "negative" », "auto").
  33. Set numberFormat.[[SignDisplay]] to signDisplay.
  34. Let roundingMode be ? GetOption(options, "roundingMode", "string", « "ceil", "floor", "expand", "trunc", "halfCeil", "halfFloor", "halfExpand", "halfTrunc", "halfEven" », "halfExpand").
  35. Set numberFormat.[[RoundingMode]] to roundingMode.
  36. Return numberFormat.
+
  1. Let requestedLocales be ? CanonicalizeLocaleList(locales).
  2. Set options to ? CoerceOptionsToObject(options).
  3. Let opt be a new Record.
  4. Let matcher be ? GetOption(options, "localeMatcher", "string", « "lookup", "best fit" », "best fit").
  5. Set opt.[[localeMatcher]] to matcher.
  6. Let numberingSystem be ? GetOption(options, "numberingSystem", "string", undefined, undefined).
  7. If numberingSystem is not undefined, then
    1. If numberingSystem does not match the Unicode Locale Identifier type nonterminal, throw a RangeError exception.
  8. Set opt.[[nu]] to numberingSystem.
  9. Let localeData be %NumberFormat%.[[LocaleData]].
  10. Let r be ResolveLocale(%NumberFormat%.[[AvailableLocales]], requestedLocales, opt, %NumberFormat%.[[RelevantExtensionKeys]], localeData).
  11. Set numberFormat.[[Locale]] to r.[[locale]].
  12. Set numberFormat.[[DataLocale]] to r.[[dataLocale]].
  13. Set numberFormat.[[NumberingSystem]] to r.[[nu]].
  14. Perform ? SetNumberFormatUnitOptions(numberFormat, options).
  15. Let style be numberFormat.[[Style]].
  16. If style is "currency", then
    1. Let currency be numberFormat.[[Currency]].
    2. Let cDigits be CurrencyDigits(currency).
    3. Let mnfdDefault be cDigits.
    4. Let mxfdDefault be cDigits.
  17. Else,
    1. Let mnfdDefault be 0.
    2. If style is "percent", then
      1. Let mxfdDefault be 0.
    3. Else,
      1. Let mxfdDefault be 3.
  18. Let notation be ? GetOption(options, "notation", "string", « "standard", "scientific", "engineering", "compact" », "standard").
  19. Set numberFormat.[[Notation]] to notation.
  20. Perform ? SetNumberFormatDigitOptions(numberFormat, options, mnfdDefault, mxfdDefault, notation).
  21. Let roundingIncrement be ? GetNumberOption(options, "roundingIncrement", 1, 5000, 1).
  22. If roundingIncrement is not in « 1, 2, 5, 10, 20, 25, 50, 100, 200, 250, 500, 1000, 2000, 2500, 5000 », throw a RangeError exception.
  23. If roundingIncrement is not 1 and numberFormat.[[RoundingType]] is not fractionDigits, throw a RangeError exception.
  24. If roundingIncrement is not 1 and numberFormat.[[MaximumFractionDigits]] is not equal to numberFormat.[[MinimumFractionDigits]], throw a RangeError exception.
  25. Set numberFormat.[[RoundingIncrement]] to roundingIncrement.
  26. Let trailingZeroDisplay be ? GetOption(options, "trailingZeroDisplay", "string", « "auto", "stripIfInteger" », "auto").
  27. Set numberFormat.[[TrailingZeroDisplay]] to trailingZeroDisplay.
  28. Let compactDisplay be ? GetOption(options, "compactDisplay", "string", « "short", "long" », "short").
  29. Let defaultUseGrouping be "auto".
  30. If notation is "compact", then
    1. Set numberFormat.[[CompactDisplay]] to compactDisplay.
    2. Set defaultUseGrouping to "min2".
  31. Let useGrouping be ? GetStringOrBooleanOption(options, "useGrouping", "boolean", undefined, true « "min2", "auto", "always" », "always", false, defaultUseGrouping).
  32. Set numberFormat.[[UseGrouping]] to useGrouping.
  33. Let signDisplay be ? GetOption(options, "signDisplay", "string", « "auto", "never", "always", "exceptZero", "negative" », "auto").
  34. Set numberFormat.[[SignDisplay]] to signDisplay.
  35. Let roundingMode be ? GetOption(options, "roundingMode", "string", « "ceil", "floor", "expand", "trunc", "halfCeil", "halfFloor", "halfExpand", "halfTrunc", "halfEven" », "halfExpand").
  36. Set numberFormat.[[RoundingMode]] to roundingMode.
  37. Return numberFormat.
diff --git a/out/numberformat/proposed.html b/out/numberformat/proposed.html index cce2fdd..dcbbe40 100644 --- a/out/numberformat/proposed.html +++ b/out/numberformat/proposed.html @@ -1868,7 +1868,7 @@

1.1.2 InitializeNumberFormat ( numberFormat The following algorithm refers to the type nonterminal from UTS 35's Unicode Locale Identifier grammar.

-
  1. Let requestedLocales be ? CanonicalizeLocaleList(locales).
  2. Set options to ? CoerceOptionsToObject(options).
  3. Let opt be a new Record.
  4. Let matcher be ? GetOption(options, "localeMatcher", "string", « "lookup", "best fit" », "best fit").
  5. Set opt.[[localeMatcher]] to matcher.
  6. Let numberingSystem be ? GetOption(options, "numberingSystem", "string", undefined, undefined).
  7. If numberingSystem is not undefined, then
    1. If numberingSystem does not match the Unicode Locale Identifier type nonterminal, throw a RangeError exception.
  8. Set opt.[[nu]] to numberingSystem.
  9. Let localeData be %NumberFormat%.[[LocaleData]].
  10. Let r be ResolveLocale(%NumberFormat%.[[AvailableLocales]], requestedLocales, opt, %NumberFormat%.[[RelevantExtensionKeys]], localeData).
  11. Set numberFormat.[[Locale]] to r.[[locale]].
  12. Set numberFormat.[[DataLocale]] to r.[[dataLocale]].
  13. Set numberFormat.[[NumberingSystem]] to r.[[nu]].
  14. Perform ? SetNumberFormatUnitOptions(numberFormat, options).
  15. Let style be numberFormat.[[Style]].
  16. If style is "currency", then
    1. Let currency be numberFormat.[[Currency]].
    2. Let cDigits be CurrencyDigits(currency).
    3. Let mnfdDefault be cDigits.
    4. Let mxfdDefault be cDigits.
  17. Else,
    1. Let mnfdDefault be 0.
    2. If style is "percent", then
      1. Let mxfdDefault be 0.
    3. Else,
      1. Let mxfdDefault be 3.
  18. Let notation be ? GetOption(options, "notation", "string", « "standard", "scientific", "engineering", "compact" », "standard").
  19. Set numberFormat.[[Notation]] to notation.
  20. Perform ? SetNumberFormatDigitOptions(numberFormat, options, mnfdDefault, mxfdDefault, notation).
  21. Let roundingIncrement be ? GetNumberOption(options, "roundingIncrement", 1, 5000, 1).
  22. If roundingIncrement is not in « 1, 2, 5, 10, 20, 25, 50, 100, 200, 250, 500, 1000, 2000, 2500, 5000 », throw a RangeError exception.
  23. If roundingIncrement is not 1 and numberFormat.[[RoundingType]] is not fractionDigits, throw a RangeError exception.
  24. If roundingIncrement and numberFormat.[[MaximumFractionDigits]] is not equal to numberFormat.[[MinimumFractionDigits]], throw a RangeError exception.
  25. Set numberFormat.[[RoundingIncrement]] to roundingIncrement.
  26. Let trailingZeroDisplay be ? GetOption(options, "trailingZeroDisplay", "string", « "auto", "stripIfInteger" », "auto").
  27. Set numberFormat.[[TrailingZeroDisplay]] to trailingZeroDisplay.
  28. Let compactDisplay be ? GetOption(options, "compactDisplay", "string", « "short", "long" », "short").
  29. Let defaultUseGrouping be "auto".
  30. If notation is "compact", then
    1. Set numberFormat.[[CompactDisplay]] to compactDisplay.
    2. Set defaultUseGrouping to "min2".
  31. Let useGrouping be ? GetStringOrBooleanOption(options, "useGrouping", « "min2", "auto", "always" », "always", false, defaultUseGrouping).
  32. Set numberFormat.[[UseGrouping]] to useGrouping.
  33. Let signDisplay be ? GetOption(options, "signDisplay", "string", « "auto", "never", "always", "exceptZero", "negative" », "auto").
  34. Set numberFormat.[[SignDisplay]] to signDisplay.
  35. Let roundingMode be ? GetOption(options, "roundingMode", "string", « "ceil", "floor", "expand", "trunc", "halfCeil", "halfFloor", "halfExpand", "halfTrunc", "halfEven" », "halfExpand").
  36. Set numberFormat.[[RoundingMode]] to roundingMode.
  37. Return numberFormat.
+
  1. Let requestedLocales be ? CanonicalizeLocaleList(locales).
  2. Set options to ? CoerceOptionsToObject(options).
  3. Let opt be a new Record.
  4. Let matcher be ? GetOption(options, "localeMatcher", "string", « "lookup", "best fit" », "best fit").
  5. Set opt.[[localeMatcher]] to matcher.
  6. Let numberingSystem be ? GetOption(options, "numberingSystem", "string", undefined, undefined).
  7. If numberingSystem is not undefined, then
    1. If numberingSystem does not match the Unicode Locale Identifier type nonterminal, throw a RangeError exception.
  8. Set opt.[[nu]] to numberingSystem.
  9. Let localeData be %NumberFormat%.[[LocaleData]].
  10. Let r be ResolveLocale(%NumberFormat%.[[AvailableLocales]], requestedLocales, opt, %NumberFormat%.[[RelevantExtensionKeys]], localeData).
  11. Set numberFormat.[[Locale]] to r.[[locale]].
  12. Set numberFormat.[[DataLocale]] to r.[[dataLocale]].
  13. Set numberFormat.[[NumberingSystem]] to r.[[nu]].
  14. Perform ? SetNumberFormatUnitOptions(numberFormat, options).
  15. Let style be numberFormat.[[Style]].
  16. If style is "currency", then
    1. Let currency be numberFormat.[[Currency]].
    2. Let cDigits be CurrencyDigits(currency).
    3. Let mnfdDefault be cDigits.
    4. Let mxfdDefault be cDigits.
  17. Else,
    1. Let mnfdDefault be 0.
    2. If style is "percent", then
      1. Let mxfdDefault be 0.
    3. Else,
      1. Let mxfdDefault be 3.
  18. Let notation be ? GetOption(options, "notation", "string", « "standard", "scientific", "engineering", "compact" », "standard").
  19. Set numberFormat.[[Notation]] to notation.
  20. Perform ? SetNumberFormatDigitOptions(numberFormat, options, mnfdDefault, mxfdDefault, notation).
  21. Let roundingIncrement be ? GetNumberOption(options, "roundingIncrement", 1, 5000, 1).
  22. If roundingIncrement is not in « 1, 2, 5, 10, 20, 25, 50, 100, 200, 250, 500, 1000, 2000, 2500, 5000 », throw a RangeError exception.
  23. If roundingIncrement is not 1 and numberFormat.[[RoundingType]] is not fractionDigits, throw a RangeError exception.
  24. If roundingIncrement is not 1 and numberFormat.[[MaximumFractionDigits]] is not equal to numberFormat.[[MinimumFractionDigits]], throw a RangeError exception.
  25. Set numberFormat.[[RoundingIncrement]] to roundingIncrement.
  26. Let trailingZeroDisplay be ? GetOption(options, "trailingZeroDisplay", "string", « "auto", "stripIfInteger" », "auto").
  27. Set numberFormat.[[TrailingZeroDisplay]] to trailingZeroDisplay.
  28. Let compactDisplay be ? GetOption(options, "compactDisplay", "string", « "short", "long" », "short").
  29. Let defaultUseGrouping be "auto".
  30. If notation is "compact", then
    1. Set numberFormat.[[CompactDisplay]] to compactDisplay.
    2. Set defaultUseGrouping to "min2".
  31. Let useGrouping be ? GetStringOrBooleanOption(options, "useGrouping", « "min2", "auto", "always" », "always", false, defaultUseGrouping).
  32. Set numberFormat.[[UseGrouping]] to useGrouping.
  33. Let signDisplay be ? GetOption(options, "signDisplay", "string", « "auto", "never", "always", "exceptZero", "negative" », "auto").
  34. Set numberFormat.[[SignDisplay]] to signDisplay.
  35. Let roundingMode be ? GetOption(options, "roundingMode", "string", « "ceil", "floor", "expand", "trunc", "halfCeil", "halfFloor", "halfExpand", "halfTrunc", "halfEven" », "halfExpand").
  36. Set numberFormat.[[RoundingMode]] to roundingMode.
  37. Return numberFormat.