1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
---
title: Intl.DateTimeFormat.prototype.resolvedOptions()
slug: Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/resolvedOptions
tags:
- DateTimeFormat
- Internationalization
- JavaScript
- Method
- Prototype
translation_of: Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/resolvedOptions
---
<div>{{JSRef}}</div>
<p>Die <strong><code>Intl.DateTimeFormat.prototype.resolvedOptions()</code></strong> Methode gibt ein Objekt mit den Eigenschaften zum Gebiet und der Datums- und Zeitformatierung zurück, die beim der Initialisierung eines {{jsxref("DateTimeFormat", "DateTimeFormat")}} Objektes berechnet werden.</p>
<div>{{EmbedInteractiveExample("pages/js/intl-datetimeformat-prototype-resolvedoptions.html")}}</div>
<h2 id="Syntax">Syntax</h2>
<pre class="syntaxbox"><code><var>dateTimeFormat</var>.resolvedOptions()</code></pre>
<h3 id="Rückgabewert">Rückgabewert</h3>
<p>Ein neues Objekt mit den Eigenschaften zum Gebiet und der Datums- und Zeitformatierung, die beim der Initialisierung eines {{jsxref("DateTimeFormat", "DateTimeFormat")}} Objektes berechnet werden.</p>
<h2 id="Beschreibung">Beschreibung</h2>
<p>Das resultierende Objekt hat die folgenden Eigenschaften:</p>
<dl>
<dt><code>locale</code></dt>
<dd>Der BCP 47 Sprach-Tag für die genutzte Sprache. Wenn Unicode-Erweiterungen im BCP 47 Sprach-Tag enthalten waren, die für die Sprache unterstützt werden, sind die Unterstützen Schlüssel-Werte-Paare in <code>locale</code> enthalten.</dd>
<dt><code>calendar</code></dt>
<dt><code>numberingSystem</code></dt>
<dd>Dieser Wert wird durch die Unicode-Erweiterungsschlüssel <code>"ca"</code> und <code>"nu"</code> oder mit einem Standardwert gefüllt.</dd>
<dt><code>timeZone</code></dt>
<dd>Die Wert für die Unterstützen Eigenschaft im <code>options</code> Argument; {{jsxref("undefined")}} (entspricht der Standard-Zeitzone der Laufzeitumgebung), wenn keine verwendet wird. Warnung: Anwendungen sollten nicht auf den Rückgabewert {{jsxref("undefined")}} programmiert sein, weil es in zukünftigen Versionen sein kann, dass ein {{jsxref("String")}} zurückgegeben wird, der die Standard-Zeitzone der Laufzeitumgebung identifiziert.</dd>
<dt><code>hour12</code></dt>
<dd>Der Wert der verwendeten Eigenschaft im <code>options</code> Argument oder ein Standard-Wert.</dd>
<dt><code>weekday</code></dt>
<dt><code>era</code></dt>
<dt><code>year</code></dt>
<dt><code>month</code></dt>
<dt><code>day</code></dt>
<dt><code>hour</code></dt>
<dt><code>minute</code></dt>
<dt><code>second</code></dt>
<dt><code>timeZoneName</code></dt>
<dd>Die Werte resultieren von den Eigenschaften in dem <code>options</code> Argument und den möglichen Kombinationen und Repräsentationen der Datums- und Zeitformatierung aus der ausgewählte Sprache. Einige der Eigenschaften können auch fehlen, was bedeutet, dass die Komponenten nicht in der formatierten Ausgabe enthalten sind.</dd>
</dl>
<h2 id="Beispiele">Beispiele</h2>
<h3 id="Einsatz_der_resolvedOptions_Methode">Einsatz der <code>resolvedOptions</code> Methode</h3>
<pre class="brush: js">var germanFakeRegion = new Intl.DateTimeFormat('de-XX', { timeZone: 'UTC' });
var usedOptions = germanFakeRegion.resolvedOptions();
usedOptions.locale; // "de"
usedOptions.calendar; // "gregory"
usedOptions.numberingSystem; // "latn"
usedOptions.timeZone; // "UTC"
usedOptions.month; // "numeric"
</pre>
<h2 id="Spezifikationen">Spezifikationen</h2>
<table class="standard-table">
<tbody>
<tr>
<th scope="col">Spezifikation</th>
<th scope="col">Status</th>
<th scope="col">Kommentar</th>
</tr>
<tr>
<td>{{SpecName('ES Int 1.0', '#sec-12.3.3', 'Intl.DateTimeFormat.prototype.resolvedOptions')}}</td>
<td>{{Spec2('ES Int 1.0')}}</td>
<td>Initiale Definition.</td>
</tr>
<tr>
<td>{{SpecName('ES Int 2.0', '#sec-Intl.DateTimeFormat.prototype.resolvedOptions', 'Intl.DateTimeFormat.prototype.resolvedOptions')}}</td>
<td>{{Spec2('ES Int 2.0')}}</td>
<td> </td>
</tr>
<tr>
<td>{{SpecName('ES Int Draft', '#sec-Intl.DateTimeFormat.prototype.resolvedOptions', 'Intl.DateTimeFormat.prototype.resolvedOptions')}}</td>
<td>{{Spec2('ES Int Draft')}}</td>
<td> </td>
</tr>
</tbody>
</table>
<h2 id="Browserkompatibilität">Browserkompatibilität</h2>
<div>
<p>{{Compat("javascript.builtins.Intl.DateTimeFormat.resolvedOptions")}}</p>
</div>
<h2 id="Siehe_auch">Siehe auch</h2>
<ul>
<li>{{jsxref("DateTimeFormat", "Intl.DateTimeFormat")}}</li>
</ul>
|