-{"id":"api/common/getLocaleExtraDayPeriodRules","title":"getLocaleExtraDayPeriodRules","contents":"\n\n<article>\n <div class=\"breadcrumb-container\">\n <div class=\"breadcrumb\">\n <script type=\"application/ld+json\">\n {\n \"@context\": \"http://schema.org\",\n \"@type\": \"BreadcrumbList\",\n \"itemListElement\": [\n { \"@type\": \"ListItem\", \"position\": 1, \"item\": { \"@id\": \"https://angular.cn//api\", \"name\": \"API\" } },\n { \"@type\": \"ListItem\", \"position\": 2, \"item\": { \"@id\": \"https://angular.cn/api/common\", \"name\": \"@angular/common\" } },\n { \"@type\": \"ListItem\", \"position\": 3, \"item\": { \"@id\": \"https://angular.cn/api/common/getLocaleExtraDayPeriodRules\", \"name\": \"getLocaleExtraDayPeriodRules\" } }\n ]\n }\n </script>\n <a href=\"/api\">API</a> > <a href=\"api/common\">@angular/common</a>\n </div>\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular-cn/edit/aio/packages/common/src/i18n/locale_data_api.ts?message=docs(common)%3A%20请简述你的修改...#L849-L898\" aria-label=\"提供编辑建议\" title=\"提供编辑建议\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n <a href=\"https://github.com/angular/angular-cn/tree/12.1.0-next.1/packages/common/src/i18n/locale_data_api.ts#L849-L898\" aria-label=\"查看源码\" title=\"查看源码\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">code</i></a>\n</div>\n </div>\n \n <header ng-should-translate=\"\" class=\"api-header\">\n <h1 id=\"getlocaleextradayperiodrules\">getLocaleExtraDayPeriodRules<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common/getLocaleExtraDayPeriodRules#getlocaleextradayperiodrules\"><i class=\"material-icons\">link</i></a></h1>\n \n <label class=\"api-type-label function\">function</label>\n \n \n \n </header>\n \n <aio-toc class=\"embedded\"></aio-toc>\n\n <div class=\"api-body\">\n \n <section ng-should-translate=\"\" class=\"short-description\">\n <p translation-result=\"on\">检索特定于语言环境的规则,该规则用于确定在为一个语言环境中定义了多个时段时要使用的一天时段。</p><p translation-origin=\"off\">Retrieves locale-specific rules used to determine which day period to use\nwhen more than one period is defined for a locale.</p>\n\n\n <p no-translate=\"\"><a href=\"api/common/getLocaleExtraDayPeriodRules#description\">查看\"说明\"...</a></p>\n </section>\n \n\n \n\n \n\n <div class=\"overload-info\">\n \n\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box api-heading\"> <span class=\"member-name\"><a href=\"api/common/getLocaleExtraDayPeriodRules\" class=\"code-anchor\">getLocaleExtraDayPeriodRules</a></span>(locale: string): (<a href=\"api/common/Time\" class=\"code-anchor\">Time</a> | [<a href=\"api/common/Time\" class=\"code-anchor\">Time</a>, <a href=\"api/common/Time\" class=\"code-anchor\">Time</a>])[]</code-example>\n\n \n\n <h6 class=\"no-anchor\" id=\"参数\">参数</h6>\n <table class=\"is-full-width list-table parameters-table function-overload-parameters\">\n <tbody>\n \n <tr class=\"function-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>locale</code>\n </td>\n <td class=\"param-type\"><code>string</code></td>\n <td class=\"param-description\">\n <p translation-result=\"on\">用于要使用的语言环境格式规则的语言环境代码。</p><p translation-origin=\"off\">A locale code for the locale format rules to use.</p>\n\n\n </td>\n </tr>\n </tbody>\n</table>\n\n \n <h6 class=\"no-anchor\" id=\"返回值\">返回值</h6>\n <p translation-result=\"on\">语言环境的规则,单个时间值或 <em>from-time,to-time</em> 或 null 的数组(如果没有可用时段)。</p><p translation-origin=\"off\"><code>(<a href=\"api/common/Time\" class=\"code-anchor\">Time</a> | [<a href=\"api/common/Time\" class=\"code-anchor\">Time</a>, <a href=\"api/common/Time\" class=\"code-anchor\">Time</a>])[]</code>: The rules for the locale, a single time value or array of <em>from-time, to-time</em>,\nor null if no periods are available.</p>\n\n\n \n\n\n \n\n \n</div>\n\n\n \n<section ng-should-translate=\"\" class=\"see-also\">\n <h2 id=\"see-also\">参见<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common/getLocaleExtraDayPeriodRules#see-also\"><i class=\"material-icons\">link</i></a></h2>\n <ul>\n \n <li><p><code><a href=\"api/common/getLocaleExtraDayPeriods\" class=\"code-anchor\">getLocaleExtraDayPeriods</a>()</code></p>\n</li>\n <li><p translation-result=\"on\"><a href=\"guide/i18n\">国际化(i18n)指南</a></p><p translation-origin=\"off\"><a href=\"https://angular.io/guide/i18n\">Internationalization (i18n) Guide</a></p>\n\n</li>\n </ul>\n</section>\n\n\n \n\n<section ng-should-translate=\"\" class=\"description\">\n <h2 id=\"description\">说明<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common/getLocaleExtraDayPeriodRules#description\"><i class=\"material-icons\">link</i></a></h2>\n <p translation-result=\"on\">每个预定义的一天时段都有一个规则。第一条规则适用于第一个一天时段,依此类推。如果没有可用的规则,请回退为 AM / PM。</p><p translation-result=\"on\">本规则可以将时间段指定为时间范围或单个时间值。</p><p translation-origin=\"off\">There is a rule for each defined day period. The\nfirst rule is applied to the first day period and so on.\nFall back to AM/PM when no rules are available.</p>\n\n<p translation-result=\"on\">仅当你加载了完整的语言环境数据时,此功能才可用。请参阅 <a href=\"guide/i18n#i18n-pipes\">“I18n 指南”</a> 。</p><p translation-origin=\"off\">A rule can specify a period as time range, or as a single time value.</p>\n\n<p translation-origin=\"off\">This functionality is only available when you have loaded the full locale data.\nSee the <a href=\"guide/i18n#i18n-pipes\">\"I18n guide\"</a>.</p>\n\n\n \n</section>\n\n\n\n\n \n\n\n </div>\n</article>\n\n<!-- links to this doc:\n - api/common\n - api/common/getLocaleExtraDayPeriods\n-->\n<!-- links from this doc:\n - /api\n - api/common\n - api/common/Time\n - api/common/getLocaleExtraDayPeriodRules#description\n - api/common/getLocaleExtraDayPeriodRules#getlocaleextradayperiodrules\n - api/common/getLocaleExtraDayPeriodRules#see-also\n - api/common/getLocaleExtraDayPeriods\n - guide/i18n\n - guide/i18n#i18n-pipes\n - https://angular.io/guide/i18n\n - https://github.com/angular/angular-cn/edit/aio/packages/common/src/i18n/locale_data_api.ts?message=docs(common)%3A%20请简述你的修改...#L849-L898\n - https://github.com/angular/angular-cn/tree/12.1.0-next.1/packages/common/src/i18n/locale_data_api.ts#L849-L898\n-->"}
0 commit comments