Skip to content

Commit fcb5f90

Browse files
new features about Number.prototype.toLocaleString() for IE11, a lot of related new definitions (#67)
* update * update * fix * update * update * update * update * update * update * update * reformat * fix * fix * fix * update * clear pollution * Update src/lib/features.js Co-authored-by: Francesco Trotta <github@fasttime.org> * update * refactorings for improved naming conventions * fix remarks generation in feature types * update * update --------- Co-authored-by: Francesco Trotta <github@fasttime.org>
1 parent 20622a6 commit fcb5f90

9 files changed

Lines changed: 344 additions & 19 deletions

File tree

Features.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ This table lists features available in the most common engines.
8282
<li><a href="api-doc/interfaces/FeatureAll.md#LOCALE_INFINITY"><code>LOCALE_INFINITY</code></a> (Internet Explorer 11 on Windows 10)
8383
<li><a href="api-doc/interfaces/FeatureAll.md#LOCALE_NUMERALS_BN"><code>LOCALE_NUMERALS_BN</code></a> (Internet Explorer 11 on Windows 10)
8484
<li><a href="api-doc/interfaces/FeatureAll.md#LOCALE_NUMERALS_EXT"><code>LOCALE_NUMERALS_EXT</code></a> (Internet Explorer 11 on Windows 10)
85+
<li><a href="api-doc/interfaces/FeatureAll.md#LOCALE_NUMERALS_IE11_WIN7"><code>LOCALE_NUMERALS_IE11_WIN7</code></a> (Internet Explorer 11 on Windows 7)
86+
<li><a href="api-doc/interfaces/FeatureAll.md#LOCALE_NUMERALS_IE11_WIN7_8"><code>LOCALE_NUMERALS_IE11_WIN7_8</code></a> (Internet Explorer 11 on Windows 7 and on Windows 8)
8587
<li><a href="api-doc/interfaces/FeatureAll.md#NO_FF_SRC"><code>NO_FF_SRC</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#IE_SRC"><code>IE_SRC</code></a>)
8688
<li><a href="api-doc/interfaces/FeatureAll.md#NO_V8_SRC"><code>NO_V8_SRC</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#IE_SRC"><code>IE_SRC</code></a>)
8789
<li><a href="api-doc/interfaces/FeatureAll.md#OBJECT_W_SELF"><code>OBJECT_W_SELF</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#WINDOW"><code>WINDOW</code></a>)

api-doc/interfaces/FeatureAll.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,14 @@ Features available in Internet Explorer 11 on Windows 10.
336336

337337
***
338338

339+
### IE\_11\_WIN\_7
340+
341+
> **IE\_11\_WIN\_7**: [`PredefinedFeature`](PredefinedFeature.md)
342+
343+
Features available in Internet Explorer 11 on Windows 7.
344+
345+
***
346+
339347
### IE\_11\_WIN\_8
340348

341349
> **IE\_11\_WIN\_8**: [`PredefinedFeature`](PredefinedFeature.md)
@@ -420,6 +428,30 @@ Available in Chrome, Edge, Firefox, Internet Explorer 11 on Windows 10, Safari,
420428

421429
***
422430

431+
### LOCALE\_NUMERALS\_IE11\_WIN7
432+
433+
> **LOCALE\_NUMERALS\_IE11\_WIN7**: [`ElementaryFeature`](ElementaryFeature.md)
434+
435+
Localized number formatting exclusive to Internet Explorer 11 on Windows 7.
436+
437+
#### Remarks
438+
439+
Available in Internet Explorer 11 on Windows 7.
440+
441+
***
442+
443+
### LOCALE\_NUMERALS\_IE11\_WIN7\_8
444+
445+
> **LOCALE\_NUMERALS\_IE11\_WIN7\_8**: [`ElementaryFeature`](ElementaryFeature.md)
446+
447+
Localized number formatting exclusive to Internet Explorer 11 on Windows 7 and 8.
448+
449+
#### Remarks
450+
451+
Available in Internet Explorer 11 on Windows 7 and on Windows 8.
452+
453+
***
454+
423455
### NAME
424456

425457
> **NAME**: [`ElementaryFeature`](ElementaryFeature.md)

api-doc/interfaces/FeatureConstructor.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,18 @@ Features available in Internet Explorer 11 on Windows 10.
566566

567567
***
568568

569+
### IE\_11\_WIN\_7
570+
571+
> **IE\_11\_WIN\_7**: [`PredefinedFeature`](PredefinedFeature.md)
572+
573+
Features available in Internet Explorer 11 on Windows 7.
574+
575+
#### Inherited from
576+
577+
[`FeatureAll`](FeatureAll.md).[`IE_11_WIN_7`](FeatureAll.md#ie_11_win_7)
578+
579+
***
580+
569581
### IE\_11\_WIN\_8
570582

571583
> **IE\_11\_WIN\_8**: [`PredefinedFeature`](PredefinedFeature.md)
@@ -678,6 +690,38 @@ Available in Chrome, Edge, Firefox, Internet Explorer 11 on Windows 10, Safari,
678690

679691
***
680692

693+
### LOCALE\_NUMERALS\_IE11\_WIN7
694+
695+
> **LOCALE\_NUMERALS\_IE11\_WIN7**: [`ElementaryFeature`](ElementaryFeature.md)
696+
697+
Localized number formatting exclusive to Internet Explorer 11 on Windows 7.
698+
699+
#### Remarks
700+
701+
Available in Internet Explorer 11 on Windows 7.
702+
703+
#### Inherited from
704+
705+
[`FeatureAll`](FeatureAll.md).[`LOCALE_NUMERALS_IE11_WIN7`](FeatureAll.md#locale_numerals_ie11_win7)
706+
707+
***
708+
709+
### LOCALE\_NUMERALS\_IE11\_WIN7\_8
710+
711+
> **LOCALE\_NUMERALS\_IE11\_WIN7\_8**: [`ElementaryFeature`](ElementaryFeature.md)
712+
713+
Localized number formatting exclusive to Internet Explorer 11 on Windows 7 and 8.
714+
715+
#### Remarks
716+
717+
Available in Internet Explorer 11 on Windows 7 and on Windows 8.
718+
719+
#### Inherited from
720+
721+
[`FeatureAll`](FeatureAll.md).[`LOCALE_NUMERALS_IE11_WIN7_8`](FeatureAll.md#locale_numerals_ie11_win7_8)
722+
723+
***
724+
681725
### NAME
682726

683727
> **NAME**: [`ElementaryFeature`](ElementaryFeature.md)

api-doc/type-aliases/ElementaryFeatureName.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
# Type Alias: ElementaryFeatureName
66

7-
> **ElementaryFeatureName** = `"ARRAY_ITERATOR"` \| `"ARROW"` \| `"AT"` \| `"BARPROP"` \| `"CAPITAL_HTML"` \| `"CONSOLE"` \| `"DOCUMENT"` \| `"ESC_HTML_QUOT"` \| `"FF_SRC"` \| `"FLAT"` \| `"FROM_CODE_POINT"` \| `"FUNCTION_19_LF"` \| `"FUNCTION_22_LF"` \| `"IE_SRC"` \| `"INCR_CHAR"` \| `"ITERATOR_HELPER"` \| `"LOCALE_INFINITY"` \| `"LOCALE_NUMERALS_BN"` \| `"LOCALE_NUMERALS_EXT"` \| `"NAME"` \| `"NO_FF_SRC"` \| `"NO_IE_SRC"` \| `"NO_V8_SRC"` \| `"OBJECT_ARRAY_ENTRIES_CTOR"` \| `"OBJECT_W_SELF"` \| `"PLAIN_INTL"` \| `"REGEXP_STRING_ITERATOR"` \| `"RUSSIAN_INFINITY"` \| `"SELF"` \| `"SHORT_LOCALES"` \| `"STATUS"` \| `"V8_SRC"` \| `"WINDOW"`
7+
> **ElementaryFeatureName** = `"ARRAY_ITERATOR"` \| `"ARROW"` \| `"AT"` \| `"BARPROP"` \| `"CAPITAL_HTML"` \| `"CONSOLE"` \| `"DOCUMENT"` \| `"ESC_HTML_QUOT"` \| `"FF_SRC"` \| `"FLAT"` \| `"FROM_CODE_POINT"` \| `"FUNCTION_19_LF"` \| `"FUNCTION_22_LF"` \| `"IE_SRC"` \| `"INCR_CHAR"` \| `"ITERATOR_HELPER"` \| `"LOCALE_INFINITY"` \| `"LOCALE_NUMERALS_BN"` \| `"LOCALE_NUMERALS_EXT"` \| `"LOCALE_NUMERALS_IE11_WIN7"` \| `"LOCALE_NUMERALS_IE11_WIN7_8"` \| `"NAME"` \| `"NO_FF_SRC"` \| `"NO_IE_SRC"` \| `"NO_V8_SRC"` \| `"OBJECT_ARRAY_ENTRIES_CTOR"` \| `"OBJECT_W_SELF"` \| `"PLAIN_INTL"` \| `"REGEXP_STRING_ITERATOR"` \| `"RUSSIAN_INFINITY"` \| `"SELF"` \| `"SHORT_LOCALES"` \| `"STATUS"` \| `"V8_SRC"` \| `"WINDOW"`
88
99
Name of an elementary feature.

api-doc/type-aliases/PredefinedFeatureName.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
# Type Alias: PredefinedFeatureName
66

7-
> **PredefinedFeatureName** = [`ElementaryFeatureName`](ElementaryFeatureName.md) \| `"AUTO"` \| `"BROWSER"` \| `"CHROME_122"` \| `"COMPACT"` \| `"DEFAULT"` \| `"FF_131"` \| `"FF_134"` \| `"FF_90"` \| `"IE_11"` \| `"IE_11_WIN_10"` \| `"IE_11_WIN_8"` \| `"NODE_20"` \| `"NODE_22"` \| `"NODE_22_12"` \| `"SAFARI_17_4"` \| `"SAFARI_18_0"` \| `"SAFARI_18_4"`
7+
> **PredefinedFeatureName** = [`ElementaryFeatureName`](ElementaryFeatureName.md) \| `"AUTO"` \| `"BROWSER"` \| `"CHROME_122"` \| `"COMPACT"` \| `"DEFAULT"` \| `"FF_131"` \| `"FF_134"` \| `"FF_90"` \| `"IE_11"` \| `"IE_11_WIN_10"` \| `"IE_11_WIN_7"` \| `"IE_11_WIN_8"` \| `"NODE_20"` \| `"NODE_22"` \| `"NODE_22_12"` \| `"SAFARI_17_4"` \| `"SAFARI_18_0"` \| `"SAFARI_18_4"`
88
99
Name of a predefined feature.

src/lib/definitions.js

Lines changed: 74 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,8 @@ function getFHPaddingEntries(index)
353353
var LOCALE_INFINITY = Feature.LOCALE_INFINITY;
354354
var LOCALE_NUMERALS_BN = Feature.LOCALE_NUMERALS_BN;
355355
var LOCALE_NUMERALS_EXT = Feature.LOCALE_NUMERALS_EXT;
356+
var LOCALE_NUMERALS_IE11_WIN7 = Feature.LOCALE_NUMERALS_IE11_WIN7;
357+
var LOCALE_NUMERALS_IE11_WIN7_8 = Feature.LOCALE_NUMERALS_IE11_WIN7_8;
356358
var NAME = Feature.NAME;
357359
var NO_FF_SRC = Feature.NO_FF_SRC;
358360
var NO_IE_SRC = Feature.NO_IE_SRC;
@@ -461,15 +463,17 @@ function getFHPaddingEntries(index)
461463
var expr = '(' + number + ')[TO_LOCALE_STRING](' + locale + ')';
462464
if (index != null)
463465
{
464-
if (index > 4)
466+
if (index % 10 === 8)
467+
expr = '(' + R_PADDINGS[3] + ' + ' + expr + ')[' + (index - index % 10 + 11) + ']';
468+
else if (index % 10 > 4)
465469
{
466-
var paddingBlock = R_PADDINGS[10 - index];
467-
expr = '(' + paddingBlock + ' + ' + expr + ')[10]';
470+
var paddingBlock = R_PADDINGS[10 - index % 10];
471+
expr = '(' + paddingBlock + ' + ' + expr + ')[' + (index - index % 10 + 10) + ']';
468472
}
469473
else
470474
expr += '[' + index + ']';
471475
}
472-
var entry = define._callWithFeatures(expr, arguments, 3);
476+
var entry = define._callWithFeatures({ expr: expr, optimize: true }, arguments, 3);
473477
return entry;
474478
}
475479

@@ -497,11 +501,12 @@ function getFHPaddingEntries(index)
497501

498502
function useLocaleNumeralDefinition(char, locale, number, index)
499503
{
500-
CHARACTERS[char] =
501-
[
502-
defineLocalizedNumeral._callWithFeatures(locale, number, index, arguments, 4),
503-
defineCharCommon(),
504-
];
504+
var entries = CHARACTERS[char];
505+
var entry = defineLocalizedNumeral._callWithFeatures(locale, number, index, arguments, 4);
506+
if (entries)
507+
entries.splice(entries.length - 1, 0, entry);
508+
else
509+
CHARACTERS[char] = [entry, defineCharCommon()];
505510
}
506511

507512
function useLocaleNumeralDigitDefinitions(locale, zeroCharCode)
@@ -1069,6 +1074,7 @@ function getFHPaddingEntries(index)
10691074
define('Infinity[TO_LOCALE_STRING]("ja")[SLICE_OR_SUBSTR]("-1")'),
10701075
define('Infinity[TO_LOCALE_STRING]("ja").at("-1")', AT),
10711076
define('Infinity[TO_LOCALE_STRING]()', LOCALE_INFINITY),
1077+
define('Infinity[TO_LOCALE_STRING]("ja")[1]', LOCALE_NUMERALS_IE11_WIN7_8),
10721078
define('Infinity[TO_LOCALE_STRING]("ru")', RUSSIAN_INFINITY),
10731079
defineCharCommon(),
10741080
],
@@ -1194,6 +1200,11 @@ function getFHPaddingEntries(index)
11941200
define({ expr: '"ar-td"', solutionType: SolutionType.COMBINED_STRING }),
11951201
define({ expr: '"ar"', solutionType: SolutionType.COMBINED_STRING }, SHORT_LOCALES),
11961202
],
1203+
LOCALE_HE:
1204+
[
1205+
define({ expr: '"He"', solutionType: SolutionType.COMBINED_STRING }),
1206+
define({ expr: '"he"', solutionType: SolutionType.COMBINED_STRING }),
1207+
],
11971208
MAP:
11981209
[
11991210
define({ expr: '"map"', optimize: true, solutionType: SolutionType.COMBINED_STRING }),
@@ -1723,21 +1734,75 @@ function getFHPaddingEntries(index)
17231734
useLocaleNumeralDefinition('ي', '"ar"', NaN, 1);
17241735
useLocaleNumeralDefinition('س', '"ar"', NaN, 2);
17251736
useLocaleNumeralDefinition('ر', '"ar"', NaN, 4, LOCALE_NUMERALS_EXT);
1737+
useLocaleNumeralDefinition('ب', '"ar"', NaN, 4, LOCALE_NUMERALS_IE11_WIN7_8);
17261738
useLocaleNumeralDefinition('ق', '"ar"', NaN, 5, LOCALE_NUMERALS_EXT);
1739+
useLocaleNumeralDefinition('ر', '"ar"', NaN, 5, LOCALE_NUMERALS_IE11_WIN7_8);
17271740
useLocaleNumeralDefinition('م', '"ar"', NaN, 6, LOCALE_NUMERALS_EXT);
1741+
useLocaleNumeralDefinition('ق', '"ar"', NaN, 6, LOCALE_NUMERALS_IE11_WIN7_8);
1742+
useLocaleNumeralDefinition('م', '"ar"', NaN, 7, LOCALE_NUMERALS_IE11_WIN7_8);
1743+
useLocaleNumeralDefinition('ا', '"ar"', Infinity, 2, LOCALE_NUMERALS_IE11_WIN7_8);
1744+
useLocaleNumeralDefinition('ن', '"ar"', Infinity, 4, LOCALE_NUMERALS_IE11_WIN7_8);
1745+
useLocaleNumeralDefinition('ه', '"ar"', Infinity, 5, LOCALE_NUMERALS_IE11_WIN7_8);
1746+
useLocaleNumeralDefinition('ة', '"ar"', Infinity, 8, LOCALE_NUMERALS_IE11_WIN7_8);
17281747
useLocaleNumeralDigitDefinitions('"bn"', 0x09e6, LOCALE_NUMERALS_BN);
1748+
useLocaleNumeralDefinition('č', '"cs"', NaN, 5, LOCALE_NUMERALS_IE11_WIN7_8);
1749+
useLocaleNumeralDefinition('μ', '"el"', NaN, 0, LOCALE_NUMERALS_IE11_WIN7_8);
1750+
useLocaleNumeralDefinition('η', '"el"', NaN, 1, LOCALE_NUMERALS_IE11_WIN7_8);
1751+
useLocaleNumeralDefinition('α', '"el"', NaN, 3, LOCALE_NUMERALS_IE11_WIN7_8);
1752+
useLocaleNumeralDefinition('ρ', '"el"', NaN, 4, LOCALE_NUMERALS_IE11_WIN7_8);
1753+
useLocaleNumeralDefinition('ι', '"el"', NaN, 5, LOCALE_NUMERALS_IE11_WIN7_8);
1754+
useLocaleNumeralDefinition('θ', '"el"', NaN, 6, LOCALE_NUMERALS_IE11_WIN7_8);
1755+
useLocaleNumeralDefinition('ό', '"el"', NaN, 8, LOCALE_NUMERALS_IE11_WIN7_8);
1756+
useLocaleNumeralDefinition('ς', '"el"', NaN, 9, LOCALE_NUMERALS_IE11_WIN7_8);
1757+
useLocaleNumeralDefinition('Ά', '"el"', Infinity, 0, LOCALE_NUMERALS_IE11_WIN7_8);
1758+
useLocaleNumeralDefinition('π', '"el"', Infinity, 1, LOCALE_NUMERALS_IE11_WIN7_8);
1759+
useLocaleNumeralDefinition('ε', '"el"', Infinity, 2, LOCALE_NUMERALS_IE11_WIN7_8);
1760+
useLocaleNumeralDefinition('ο', '"el"', Infinity, 5, LOCALE_NUMERALS_IE11_WIN7_8);
17291761
useLocaleNumeralDigitDefinitions('"fa"', 0x06f0);
17301762
useLocaleNumeralDefinition('٬', '"fa"', 1000, 1);
17311763
useLocaleNumeralDefinition('ن', '"fa"', NaN, 0, LOCALE_NUMERALS_EXT);
17321764
useLocaleNumeralDefinition('ا', '"fa"', NaN, 1, LOCALE_NUMERALS_EXT);
17331765
useLocaleNumeralDefinition('ع', '"fa"', NaN, 2, LOCALE_NUMERALS_EXT);
17341766
useLocaleNumeralDefinition('د', '"fa"', NaN, 3, LOCALE_NUMERALS_EXT);
1767+
useLocaleNumeralDefinition('ש', 'LOCALE_HE', -Infinity, 7, LOCALE_NUMERALS_IE11_WIN7_8);
1768+
useLocaleNumeralDefinition('י', 'LOCALE_HE', Infinity, 1, LOCALE_NUMERALS_IE11_WIN7_8);
1769+
useLocaleNumeralDefinition('נ', 'LOCALE_HE', Infinity, 2, LOCALE_NUMERALS_IE11_WIN7_8);
1770+
useLocaleNumeralDefinition('ו', 'LOCALE_HE', Infinity, 4, LOCALE_NUMERALS_IE11_WIN7_8);
1771+
useLocaleNumeralDefinition('ף', 'LOCALE_HE', Infinity, 5, LOCALE_NUMERALS_IE11_WIN7_8);
1772+
useLocaleNumeralDefinition('ח', 'LOCALE_HE', Infinity, 7, LOCALE_NUMERALS_IE11_WIN7_8);
1773+
useLocaleNumeralDefinition('ב', 'LOCALE_HE', Infinity, 10, LOCALE_NUMERALS_IE11_WIN7_8);
1774+
useLocaleNumeralDefinition('ל', 'LOCALE_HE', NaN, 0, LOCALE_NUMERALS_IE11_WIN7_8);
1775+
useLocaleNumeralDefinition('א', 'LOCALE_HE', NaN, 1, LOCALE_NUMERALS_IE11_WIN7_8);
1776+
useLocaleNumeralDefinition('מ', 'LOCALE_HE', NaN, 3, LOCALE_NUMERALS_IE11_WIN7_8);
1777+
useLocaleNumeralDefinition('ס', 'LOCALE_HE', NaN, 4, LOCALE_NUMERALS_IE11_WIN7_8);
1778+
useLocaleNumeralDefinition('פ', 'LOCALE_HE', NaN, 5, LOCALE_NUMERALS_IE11_WIN7_8);
1779+
useLocaleNumeralDefinition('ר', 'LOCALE_HE', NaN, 6, LOCALE_NUMERALS_IE11_WIN7_8);
1780+
useLocaleNumeralDefinition('非', '"ja"', NaN, 5, LOCALE_NUMERALS_IE11_WIN7_8);
1781+
useLocaleNumeralDefinition('数', '"ja"', NaN, 6, LOCALE_NUMERALS_IE11_WIN7_8);
1782+
useLocaleNumeralDefinition('値', '"ja"', NaN, 7, LOCALE_NUMERALS_IE11_WIN7_8);
1783+
useLocaleNumeralDefinition('ė', '"lt"', Infinity, 7, LOCALE_NUMERALS_IE11_WIN7_8);
1784+
useLocaleNumeralDefinition('ī', '"lv"', Infinity, 6, LOCALE_NUMERALS_IE11_WIN7);
1785+
useLocaleNumeralDefinition('ń', '"pl"', Infinity, 7, LOCALE_NUMERALS_IE11_WIN7_8);
1786+
useLocaleNumeralDefinition('ś', '"pl"', Infinity, 13, LOCALE_NUMERALS_IE11_WIN7_8);
1787+
useLocaleNumeralDefinition('ć', '"pl"', Infinity, 14, LOCALE_NUMERALS_IE11_WIN7_8);
1788+
useLocaleNumeralDefinition('ą', '"pl"', NaN, 14, LOCALE_NUMERALS_IE11_WIN7_8);
17351789
useLocaleNumeralDefinition('н', '"ru"', NaN, 0, LOCALE_NUMERALS_EXT);
17361790
useLocaleNumeralDefinition('е', '"ru"', NaN, 1, LOCALE_NUMERALS_EXT);
17371791
useLocaleNumeralDefinition('ч', '"ru"', NaN, 3, LOCALE_NUMERALS_EXT);
17381792
useLocaleNumeralDefinition('и', '"ru"', NaN, 4, LOCALE_NUMERALS_EXT);
17391793
useLocaleNumeralDefinition('с', '"ru"', NaN, 5, LOCALE_NUMERALS_EXT);
17401794
useLocaleNumeralDefinition('л', '"ru"', NaN, 6, LOCALE_NUMERALS_EXT);
17411795
useLocaleNumeralDefinition('о', '"ru"', NaN, 7, LOCALE_NUMERALS_EXT);
1796+
useLocaleNumeralDefinition('б', '"ru"', Infinity, 0, LOCALE_NUMERALS_IE11_WIN7);
1797+
useLocaleNumeralDefinition('е', '"ru"', Infinity, 1, LOCALE_NUMERALS_IE11_WIN7);
1798+
useLocaleNumeralDefinition('с', '"ru"', Infinity, 2, LOCALE_NUMERALS_IE11_WIN7);
1799+
useLocaleNumeralDefinition('к', '"ru"', Infinity, 3, LOCALE_NUMERALS_IE11_WIN7);
1800+
useLocaleNumeralDefinition('н', '"ru"', Infinity, 5, LOCALE_NUMERALS_IE11_WIN7);
1801+
useLocaleNumeralDefinition('ч', '"ru"', Infinity, 7, LOCALE_NUMERALS_IE11_WIN7);
1802+
useLocaleNumeralDefinition('о', '"ru"', Infinity, 9, LOCALE_NUMERALS_IE11_WIN7);
1803+
useLocaleNumeralDefinition('т', '"ru"', Infinity, 11, LOCALE_NUMERALS_IE11_WIN7);
1804+
useLocaleNumeralDefinition('ь', '"ru"', Infinity, 12, LOCALE_NUMERALS_IE11_WIN7);
1805+
useLocaleNumeralDefinition('正', '"zh"', Infinity, 0, LOCALE_NUMERALS_IE11_WIN7_8);
1806+
useLocaleNumeralDefinition('字', '"zh-cn"', NaN, 2, LOCALE_NUMERALS_IE11_WIN7_8);
17421807
}
17431808
)();

src/lib/features.js

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,46 @@ var featureInfos =
320320
return available;
321321
},
322322
},
323+
LOCALE_NUMERALS_IE11_WIN7:
324+
{
325+
description:
326+
'Localized number formatting exclusive to Internet Explorer 11 on Windows 7.',
327+
check:
328+
function ()
329+
{
330+
var available =
331+
checkLocaleNumeral('lv', Infinity, /^......ī/) &&
332+
checkLocaleNumeral('ru', Infinity, /^беск.н.ч.о.ть/);
333+
return available;
334+
},
335+
excludes: ['RUSSIAN_INFINITY'],
336+
},
337+
LOCALE_NUMERALS_IE11_WIN7_8:
338+
{
339+
description:
340+
'Localized number formatting exclusive to Internet Explorer 11 on Windows 7 and 8.',
341+
check:
342+
function ()
343+
{
344+
var available =
345+
checkLocaleNumeral('ar', NaN, /^ليس.برقم/) &&
346+
checkLocaleNumeral('ar', Infinity, /^..ا.نه..ة/) &&
347+
checkLocaleNumeral('cs', NaN, /^.....č/) &&
348+
checkLocaleNumeral('el', Infinity, /^Άπε..ο/) &&
349+
checkLocaleNumeral('el', NaN, /^μη.αριθ.ός/) &&
350+
checkLocaleNumeral('he', NaN, /^לא.מספר/) &&
351+
checkLocaleNumeral('he', Infinity, /^.ינ.וף.ח..ב/) &&
352+
checkLocaleNumeral('he', -Infinity, /^.......ש/) &&
353+
checkLocaleNumeral('ja', Infinity, /^./) &&
354+
checkLocaleNumeral('ja', NaN, /^...../) &&
355+
checkLocaleNumeral('lt', Infinity, /^.......ė/) &&
356+
checkLocaleNumeral('pl', Infinity, /^.......ń.....ść/) &&
357+
checkLocaleNumeral('pl', NaN, /^..............ą/) &&
358+
checkLocaleNumeral('zh', Infinity, /^/) &&
359+
checkLocaleNumeral('zh-cn', NaN, /^../);
360+
return available;
361+
},
362+
},
323363
NAME:
324364
{
325365
description: 'Existence of the name property for functions.',
@@ -419,13 +459,14 @@ var featureInfos =
419459
},
420460
RUSSIAN_INFINITY:
421461
{
422-
description: 'Russian string representation of Infinity as "∞".',
462+
description: 'Russian string representation of Infinity as "∞".',
423463
check:
424464
function ()
425465
{
426466
var available = Infinity.toLocaleString('ru') === '∞';
427467
return available;
428468
},
469+
excludes: ['LOCALE_NUMERALS_IE11_WIN7'],
429470
},
430471
SELF:
431472
{
@@ -658,13 +699,22 @@ var featureInfos =
658699
],
659700
attributes: { 'char-increment-restriction': null, 'web-worker-restriction': null },
660701
},
702+
IE_11_WIN_7:
703+
{
704+
inherits: 'IE_11',
705+
versions: ['11'],
706+
compatibilityTag: 'on Windows 7',
707+
compatibilityShortTag: 'W7',
708+
includes:
709+
{ LOCALE_NUMERALS_IE11_WIN7: true, LOCALE_NUMERALS_IE11_WIN7_8: true },
710+
},
661711
IE_11_WIN_8:
662712
{
663713
inherits: 'IE_11',
664714
versions: ['11'],
665715
compatibilityTag: 'on Windows 8',
666716
compatibilityShortTag: 'W8',
667-
includes: { RUSSIAN_INFINITY: true },
717+
includes: { LOCALE_NUMERALS_IE11_WIN7_8: true, RUSSIAN_INFINITY: true },
668718
},
669719
IE_11_WIN_10:
670720
{

0 commit comments

Comments
 (0)