--- title: Intl.NumberFormat.prototype slug: conflicting/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat tags: - Internationalisation - Intl - JavaScript - NumberFormat - Propriété - Prototype - Reference - i18n translation_of: Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat translation_of_original: Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/prototype original_slug: Web/JavaScript/Reference/Objets_globaux/Intl/NumberFormat/prototype ---
{{JSRef}}

La propriété Intl.NumberFormat.prototype représente l'objet prototype pour le constructeur {{jsxref("NumberFormat", "Intl.NumberFormat")}}.

{{js_property_attributes(0,0,0)}}

Description

Voir la page {{jsxref("NumberFormat", "Intl.NumberFormat")}} pour une description des instances de Intl.NumberFormat.

Les instances de Intl.NumberFormat héritent de Intl.NumberFormat.prototype. Les modifications apportées à l'objet prototype seront propagées par héritage aux instances  Intl.NumberFormat.

Propriétés

Intl.NumberFormat.prototype.constructor
Une référence à Intl.NumberFormat.

Méthodes

{{jsxref("NumberFormat.format", "Intl.NumberFormat.prototype.format")}}
Un accesseur qui renvoie une fonction permettant de formater un nombre en fonction des options de locale et de format définies dans un objet NumberFormat.
{{jsxref("NumberFormat.formatToParts", "Intl.NumberFormat.prototype.formatToParts()")}}
Cette méthode renvoie un tableau ({{jsxref("Array")}}) d'objets qui représentent les fragments de la chaîne de caractères correspondant au nombre afin de l'utiliser pour des mises en formes prenant en compte la locale de l'utilisateur.
{{jsxref("NumberFormat.resolvedOptions", "Intl.NumberFormat.prototype.resolvedOptions()")}}
Cette méthode renvoie un nouvel objet dont les propriétés correspondent aux options de locale et de collation calculées lors de l'initialisation de l'objet.

Spécifications

Spécification État Commentaires
{{SpecName('ES Int 1.0', '#sec-11.2.1', 'Intl.NumberFormat.prototype')}} {{Spec2('ES Int 1.0')}} Définition initiale.
{{SpecName('ES Int 2.0', '#sec-11.2.1', 'Intl.NumberFormat.prototype')}} {{Spec2('ES Int 2.0')}}  
{{SpecName('ES Int Draft', '#sec-Intl.NumberFormat.prototype', 'Intl.NumberFormat.prototype')}} {{Spec2('ES Int Draft')}}  

Compatibilité des navigateurs

{{Compat("javascript.builtins.Intl.NumberFormat.prototype")}}

Voir aussi