@@ -44,6 +44,8 @@ export class MyModule {
4444}
4545```
4646
47+ Also, every pipe accepts the ` locale ` option.
48+
4749Now you can use the pipes, see below.
4850
4951## Pipes
@@ -64,8 +66,11 @@ The input date can be one of the following:
6466* null
6567* undefined
6668
67- The options are a subset of the options for ` new Intl.DateTimeFormat() ` . For a list of the options, see
68- their [ docs] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options ) .
69+ The following options are supported:
70+
71+ * [ ` dateStyle ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#datestyle )
72+ * [ ` timeStyle ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#timestyle )
73+ * [ ` hour12 ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#hour12 )
6974
7075With the ` INTL_DATE_PIPE_DEFAULT_OPTIONS ` injection token you can specify default options.
7176
@@ -84,8 +89,15 @@ The input can be one of the following:
8489* null
8590* undefined
8691
87- The options are a subset of the options for ` new Intl.NumberFormat() ` . For a list of the options, see
88- their [ docs] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options ) .
92+ The following options are supported:
93+
94+ * [ ` notation ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#notation )
95+ * [ ` signDisplay ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#signdisplay )
96+ * [ ` minimumIntegerDigits ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#minimumintegerdigits )
97+ * [ ` minimumFractionDigits ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#minimumfractiondigits )
98+ * [ ` maximumFractionDigits ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#maximumfractiondigits )
99+ * [ ` minimumSignificantDigits ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#minimumsignificantdigits )
100+ * [ ` maximumSignificantDigits ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#maximumsignificantdigits )
89101
90102With the ` INTL_DECIMAL_PIPE_DEFAULT_OPTIONS ` injection token you can specify default options.
91103
@@ -104,8 +116,15 @@ The input can be one of the following:
104116* null
105117* undefined
106118
107- The options are a subset of the options for ` new Intl.NumberFormat() ` . For a list of the options, see
108- their [ docs] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options ) .
119+ The following options are supported:
120+
121+ * [ ` notation ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#notation )
122+ * [ ` signDisplay ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#signdisplay )
123+ * [ ` minimumIntegerDigits ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#minimumintegerdigits )
124+ * [ ` minimumFractionDigits ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#minimumfractiondigits )
125+ * [ ` maximumFractionDigits ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#maximumfractiondigits )
126+ * [ ` minimumSignificantDigits ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#minimumsignificantdigits )
127+ * [ ` maximumSignificantDigits ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#maximumsignificantdigits )
109128
110129With the ` INTL_PERCENT_PIPE_DEFAULT_OPTIONS ` injection token you can specify default options.
111130
@@ -127,8 +146,17 @@ The input can be one of the following:
127146The currency code parameter is required and must be a valid ISO 4217 currency code. If you want to transform a decimal
128147number instead, use the ` intlDecimal ` pipe.
129148
130- The options are a subset of the options for ` new Intl.NumberFormat() ` . For a list of the options, see
131- their [ docs] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options ) .
149+ The following additional options are supported:
150+
151+ * [ ` currencyDisplay ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#currencydisplay )
152+ * [ ` currencySign ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#currencysign )
153+ * [ ` notation ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#notation )
154+ * [ ` signDisplay ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#signdisplay )
155+ * [ ` minimumIntegerDigits ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#minimumintegerdigits )
156+ * [ ` minimumFractionDigits ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#minimumfractiondigits )
157+ * [ ` maximumFractionDigits ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#maximumfractiondigits )
158+ * [ ` minimumSignificantDigits ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#minimumsignificantdigits )
159+ * [ ` maximumSignificantDigits ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#maximumsignificantdigits )
132160
133161With the ` INTL_CURRENCY_PIPE_DEFAULT_OPTIONS ` injection token you can specify default options.
134162
@@ -146,8 +174,9 @@ The input can be one of the following:
146174* null
147175* undefined
148176
149- The options are a subset of the options for ` new Intl.DisplayNames() ` . For a list of the options, see
150- their [ docs] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/DisplayNames#options ) .
177+ The following option is supported:
178+
179+ * [ ` languageDisplay ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/DisplayNames#languagedisplay )
151180
152181With the ` INTL_LANGUAGE_PIPE_DEFAULT_OPTIONS ` injection token you can specify default options.
153182
@@ -165,11 +194,6 @@ The input can be one of the following:
165194* null
166195* undefined
167196
168- The options are a subset of the options for ` new Intl.DisplayNames() ` . For a list of the options, see
169- their [ docs] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/DisplayNames#options ) .
170-
171- With the ` INTL_COUNTRY_PIPE_DEFAULT_OPTIONS ` injection token you can specify default options.
172-
173197### Unit pipe
174198
175199Use the unit pipe like the following:
@@ -189,8 +213,16 @@ The unit parameter is required, see
189213the [ specification] ( https://tc39.es/proposal-unified-intl-numberformat/section6/locales-currencies-tz_proposed_out.html#sec-issanctionedsimpleunitidentifier )
190214for a full list of possible values. If you want to transform a decimal number instead, use the ` intlDecimal ` pipe.
191215
192- The options are a subset of the options for ` new Intl.NumberFormat() ` . For a list of the options, see
193- their [ docs] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options ) .
216+ The following additional options are supported:
217+
218+ * [ ` unitDisplay ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#unitdisplay )
219+ * [ ` notation ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#notation )
220+ * [ ` signDisplay ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#signdisplay )
221+ * [ ` minimumIntegerDigits ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#minimumintegerdigits )
222+ * [ ` minimumFractionDigits ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#minimumfractiondigits )
223+ * [ ` maximumFractionDigits ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#maximumfractiondigits )
224+ * [ ` minimumSignificantDigits ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#minimumsignificantdigits )
225+ * [ ` maximumSignificantDigits ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#maximumsignificantdigits )
194226
195227With the ` INTL_UNIT_PIPE_DEFAULT_OPTIONS ` injection token you can specify default options.
196228
@@ -208,13 +240,18 @@ The input can be one of the following:
208240* null
209241* undefined
210242
211- The options are a subset of the options for ` new Intl.ListFormat() ` . For a list of the options, see
212- their [ docs] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#options ) .
243+ The following options are supported:
244+
245+ * [ ` type ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#type )
246+ * [ ` style ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#style )
213247
214248With the ` INTL_LIST_PIPE_DEFAULT_OPTIONS ` injection token you can specify default options.
215249
216250## Relative Time (timeago) pipe
217251
252+ The relative time format will format the input date compared to the current date in a "timeago" format. Every minute,
253+ the value will be updated automatically.
254+
218255Use the relative time pipe like the following:
219256
220257```
@@ -229,8 +266,10 @@ The input date can be one of the following:
229266* null
230267* undefined
231268
232- The options are a subset of the options for ` new Intl.RelativeTimeFormat() ` . For a list of the options, see
233- their [ docs] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#options ) .
269+ The following options are supported:
270+
271+ * [ ` numeric ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#numeric )
272+ * [ ` style ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#style )
234273
235274With the ` INTL_RELATIVE_TIME_PIPE_DEFAULT_OPTIONS ` injection token you can specify default options.
236275
0 commit comments