ECMA 402-2015 ECMAScript Internationalization API Specification (2nd Edition).pdf
《ECMA 402-2015 ECMAScript Internationalization API Specification (2nd Edition).pdf》由会员分享,可在线阅读,更多相关《ECMA 402-2015 ECMAScript Internationalization API Specification (2nd Edition).pdf(48页珍藏版)》请在麦多课文档分享上搜索。
1、 Reference number ECMA-123:2009 Ecma International 2009 ECMA-402 2nd Edition / June 2015 ECMAScript 2015 Internationalization API Specification COPYRIGHT PROTECTED DOCUMENT Ecma International 2015 Ecma International 2015 i Copyright notice Copyright 2015 Ecma International Ecma International Rue du
2、Rhone 114 CH-1204 Geneva Tel: +41 22 849 6000 Fax: +41 22 849 6001 Web: http:/www.ecma-international.org This document and possible translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared,
3、copied, published, and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this section are included on all such copies and derivative works. However, this document itself may not be modified in any way, including by removing the copyright
4、notice or references to Ecma International, except as needed for the purpose of developing any document or deliverable produced by Ecma International (in which case the rules applied to copyrights must be followed) or as required to translate it into languages other than English. The limited permiss
5、ions granted above are perpetual and will not be revoked by Ecma International or its successors or assigns. This document and the information contained herein is provided on an “AS IS“ basis and ECMA INTERNATIONAL DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRAN
6、TY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.“ Software License All Software contained in this document (“Software)“ is protected by copyright and is being made available under the “B
7、SD License“, included below. This Software may be subject to third party rights (rights from parties other than Ecma International), including patent rights, and no licenses under such third party rights are granted under this license even if the third party concerned is a member of Ecma Internation
8、al. SEE THE ECMA CODE OF CONDUCT IN PATENT MATTERS AVAILABLE AT http:/www.ecma-international.org/memento/codeofconduct.htm FOR INFORMATION REGARDING THE LICENSING OF PATENT CLAIMS THAT ARE REQUIRED TO IMPLEMENT ECMA INTERNATIONAL STANDARDS*. Redistribution and use in source and binary forms, with or
9、 without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list
10、of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the authors nor Ecma International may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTW
11、ARE IS PROVIDED BY THE ECMA INTERNATIONAL “AS IS“ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ECMA INTERNATIONAL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
12、SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OT
13、HERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ii Ecma International 2015 Ecma International 2015 iii Contents Page Copyright notice i 1 Scope 1 2 Conformance . 1 3 Normative References . 1 4 Overview . 2 4.1 Internationalization, Loca
14、lization, and Globalization 2 4.2 API Overview 2 4.3 Implementation Dependencies 3 5 Notational Conventions 3 5.1 Well-Known Intrinsic Objects . 4 6 Identification of Locales, Currencies, and Time Zones . 5 6.1 Case Sensitivity and Case Mapping 5 6.2 Language Tags 5 6.2.1 Unicode Locale Extension Se
15、quences 5 6.2.2 IsStructurallyValidLanguageTag (locale) 5 6.2.3 CanonicalizeLanguageTag (locale) . 6 6.2.4 DefaultLocale () 6 6.3 Currency Codes . 6 6.3.1 IsWellFormedCurrencyCode (currency) . 6 6.4 Time Zone Names 6 6.4.1 IsValidTimeZoneName (timeZone) . 7 6.4.2 CanonicalizeTimeZoneName (timeZone)
16、7 6.4.3 DefaultTimeZone () 7 7 Requirements for Standard Built-in ECMAScript Objects 7 8 The Intl Object 7 8.1 Properties of the Intl Object . 7 9 Locale and Parameter Negotiation 8 9.1 Internal slots of Service Constructors 8 9.2 Abstract Operations 8 9.2.1 CanonicalizeLocaleList (locales) . 8 9.2.
17、2 BestAvailableLocale (availableLocales, locale) . 9 9.2.3 LookupMatcher (availableLocales, requestedLocales) . 9 9.2.4 BestFitMatcher (availableLocales, requestedLocales) 10 9.2.5 ResolveLocale (availableLocales, requestedLocales, options, relevantExtensionKeys, localeData) . 10 9.2.6 LookupSupport
18、edLocales (availableLocales, requestedLocales) . 11 9.2.7 BestFitSupportedLocales (availableLocales, requestedLocales) 12 9.2.8 SupportedLocales (availableLocales, requestedLocales, options) . 12 9.2.9 GetOption (options, property, type, values, fallback) 12 9.2.10 GetNumberOption (options, property
19、, minimum, maximum, fallback) 13 10 Collator Objects . 13 10.1 The Intl.Collator Constructor 13 10.1.1 InitializeCollator (collator, locales, options) . 13 10.1.2 Intl.Collator( locales , options) 15 10.2 Properties of the Intl.Collator Constructor . 15 10.2.1 Intl.Collator.prototype . 15 10.2.2 Int
20、l.Collator.supportedLocalesOf (locales , options ) . 15 iv Ecma International 2015 10.2.3 Internal slots 15 10.3 Properties of the Intl.Collator Prototype Object 16 10.3.1 Intl.Collator.prototype.constructor . 16 10.3.2 Intl.Collator.prototypetoStringTag 16 10.3.3 Intl.Cpare 16 10.3.4 Collator Compa
21、re Functions . 16 10.3.5 Intl.Collator.prototype.resolvedOptions () . 17 10.4 Properties of Intl.Collator Instances . 17 11 NumberFormat Objects 18 11.1 The Intl.NumberFormat Constructor. 18 11.1.1 InitializeNumberFormat (numberFormat, locales, options) . 18 11.1.2 Intl.NumberFormat( locales , optio
22、ns) . 19 11.2 Properties of the Intl.NumberFormat Constructor 20 11.2.1 Intl.NumberFormat.prototype 20 11.2.2 Intl.NumberFormat.supportedLocalesOf (locales , options ) 20 11.2.3 Internal slots 20 11.3 Properties of the Intl.NumberFormat Prototype Object 20 11.3.1 Intl.NumberFormat.prototype.construc
23、tor . 21 11.3.2 Intl.NumberFormat.prototypetoStringTag 21 11.3.3 Intl.NumberFormat.prototype.format 21 11.3.4 Number Format Functions . 21 11.3.5 Intl.NumberFormat.prototype.resolvedOptions () . 24 11.4 Properties of Intl.NumberFormat Instances . 24 12 DateTimeFormat Objects . 25 12.1 The Intl.DateT
24、imeFormat Constructor 25 12.1.1 InitializeDateTimeFormat (dateTimeFormat, locales, options) 25 12.1.2 Intl.DateTimeFormat( locales , options ) . 28 12.2 Properties of the Intl.DateTimeFormat Constructor 28 12.2.1 Intl.DateTimeFormat.prototype . 28 12.2.2 Intl.DateTimeFormat.supportedLocalesOf (local
- 1.请仔细阅读文档,确保文档完整性,对于不预览、不比对内容而直接下载带来的问题本站不予受理。
- 2.下载的文档,不会出现我们的网址水印。
- 3、该文档所得收入(下载+内容+预览)归上传者、原创作者;如果您是本文档原作者,请点此认领!既往收益都归您。
下载文档到电脑,查找使用更方便
10000 积分 0人已下载
下载 | 加入VIP,交流精品资源 |
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- ECMA4022015ECMASCRIPTINTERNATIONALIZATIONAPISPECIFICATION2NDEDITIONPDF

链接地址:http://www.mydoc123.com/p-704835.html