* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getWeekInfo * https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getWeekInfo
()
| 765 | * https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getWeekInfo |
| 766 | */ |
| 767 | public getWeekInfo(): { |
| 768 | firstDay: string |
| 769 | weekend: {start: string; end: string} |
| 770 | minimalDays: number |
| 771 | } { |
| 772 | const info = Object.create(Object.prototype) |
| 773 | const internalSlots = getInternalSlots(this) |
| 774 | if (!HasOwnProperty(internalSlots, 'initializedLocale')) { |
| 775 | throw new TypeError('Error uninitialized locale') |
| 776 | } |
| 777 | |
| 778 | const wi = weekInfoOfLocale(this) |
| 779 | const we = wi.weekend |
| 780 | |
| 781 | createDataProperty(info, 'firstDay', wi.firstDay) |
| 782 | |
| 783 | createDataProperty(info, 'weekend', we) |
| 784 | |
| 785 | createDataProperty(info, 'minimalDays', wi.minimalDays) |
| 786 | |
| 787 | const fw = internalSlots.firstDayOfWeek |
| 788 | if (fw !== undefined) { |
| 789 | info.firstDay = fw |
| 790 | } |
| 791 | |
| 792 | return info |
| 793 | } |
| 794 | |
| 795 | static relevantExtensionKeys: readonly [ |
| 796 | 'ca', |
no test coverage detected