--- 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 ---
Die Intl.DateTimeFormat.prototype.resolvedOptions() 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.
dateTimeFormat.resolvedOptions()
Ein neues Objekt mit den Eigenschaften zum Gebiet und der Datums- und Zeitformatierung, die beim der Initialisierung eines {{jsxref("DateTimeFormat", "DateTimeFormat")}} Objektes berechnet werden.
Das resultierende Objekt hat die folgenden Eigenschaften:
localelocale enthalten.calendarnumberingSystem"ca" und "nu" oder mit einem Standardwert gefüllt.timeZoneoptions 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.hour12options Argument oder ein Standard-Wert.weekdayerayearmonthdayhourminutesecondtimeZoneNameoptions 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.resolvedOptions Methodevar 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"
| Spezifikation | Status | Kommentar |
|---|---|---|
| {{SpecName('ES Int 1.0', '#sec-12.3.3', 'Intl.DateTimeFormat.prototype.resolvedOptions')}} | {{Spec2('ES Int 1.0')}} | Initiale Definition. |
| {{SpecName('ES Int 2.0', '#sec-Intl.DateTimeFormat.prototype.resolvedOptions', 'Intl.DateTimeFormat.prototype.resolvedOptions')}} | {{Spec2('ES Int 2.0')}} | |
| {{SpecName('ES Int Draft', '#sec-Intl.DateTimeFormat.prototype.resolvedOptions', 'Intl.DateTimeFormat.prototype.resolvedOptions')}} | {{Spec2('ES Int Draft')}} |
{{Compat("javascript.builtins.Intl.DateTimeFormat.resolvedOptions")}}