Skip to content

Commit d34c033

Browse files
JeanMechealxhub
authored andcommitted
refactor(common): Deprecate Local Data API functions (#54483)
Ahead of delegating the i18n subsystem to the `Intl` API, this commit introduce the intention to remove those functions from the public API. DEPRECATED: `getCurrencySymbol`, `getLocaleCurrencyCode`, `getLocaleCurrencyName`, `getLocaleCurrencySymbol`, `getLocaleDateFormat`, `getLocaleDateTimeFormat`, `getLocaleDayNames`, `getLocaleDayPeriods`, `getLocaleDirection`, `getLocaleEraNames`, `getLocaleExtraDayPeriodRules`, `getLocaleExtraDayPeriods`, `getLocaleFirstDayOfWeek`, `getLocaleId`, `getLocaleMonthNames`, `getLocaleNumberFormat`, `getLocaleNumberSymbol`, `getLocalePluralCase`, `getLocaleTimeFormat`, `getLocaleWeekEndRange`, `getNumberOfCurrencyDigits` PR Close #54483
1 parent f914f6a commit d34c033

File tree

2 files changed

+116
-31
lines changed

2 files changed

+116
-31
lines changed

goldens/public-api/common/index.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -178,83 +178,83 @@ export function formatNumber(value: number, locale: string, digitsInfo?: string)
178178
// @public
179179
export function formatPercent(value: number, locale: string, digitsInfo?: string): string;
180180

181-
// @public
181+
// @public @deprecated
182182
export enum FormatWidth {
183183
Full = 3,
184184
Long = 2,
185185
Medium = 1,
186186
Short = 0
187187
}
188188

189-
// @public
189+
// @public @deprecated
190190
export enum FormStyle {
191191
// (undocumented)
192192
Format = 0,
193193
// (undocumented)
194194
Standalone = 1
195195
}
196196

197-
// @public
197+
// @public @deprecated
198198
export function getCurrencySymbol(code: string, format: 'wide' | 'narrow', locale?: string): string;
199199

200-
// @public
200+
// @public @deprecated
201201
export function getLocaleCurrencyCode(locale: string): string | null;
202202

203-
// @public
203+
// @public @deprecated
204204
export function getLocaleCurrencyName(locale: string): string | null;
205205

206-
// @public
206+
// @public @deprecated
207207
export function getLocaleCurrencySymbol(locale: string): string | null;
208208

209-
// @public
209+
// @public @deprecated
210210
export function getLocaleDateFormat(locale: string, width: FormatWidth): string;
211211

212-
// @public
212+
// @public @deprecated
213213
export function getLocaleDateTimeFormat(locale: string, width: FormatWidth): string;
214214

215-
// @public
215+
// @public @deprecated
216216
export function getLocaleDayNames(locale: string, formStyle: FormStyle, width: TranslationWidth): ReadonlyArray<string>;
217217

218-
// @public
218+
// @public @deprecated
219219
export function getLocaleDayPeriods(locale: string, formStyle: FormStyle, width: TranslationWidth): Readonly<[string, string]>;
220220

221-
// @public
221+
// @public @deprecated
222222
export function getLocaleDirection(locale: string): 'ltr' | 'rtl';
223223

224-
// @public
224+
// @public @deprecated
225225
export function getLocaleEraNames(locale: string, width: TranslationWidth): Readonly<[string, string]>;
226226

227-
// @public
227+
// @public @deprecated
228228
export function getLocaleExtraDayPeriodRules(locale: string): (Time | [Time, Time])[];
229229

230-
// @public
230+
// @public @deprecated
231231
export function getLocaleExtraDayPeriods(locale: string, formStyle: FormStyle, width: TranslationWidth): string[];
232232

233-
// @public
233+
// @public @deprecated
234234
export function getLocaleFirstDayOfWeek(locale: string): WeekDay;
235235

236-
// @public
236+
// @public @deprecated
237237
export function getLocaleId(locale: string): string;
238238

239-
// @public
239+
// @public @deprecated
240240
export function getLocaleMonthNames(locale: string, formStyle: FormStyle, width: TranslationWidth): ReadonlyArray<string>;
241241

242-
// @public
242+
// @public @deprecated
243243
export function getLocaleNumberFormat(locale: string, type: NumberFormatStyle): string;
244244

245-
// @public
245+
// @public @deprecated
246246
export function getLocaleNumberSymbol(locale: string, symbol: NumberSymbol): string;
247247

248-
// @public
248+
// @public @deprecated (undocumented)
249249
export const getLocalePluralCase: (locale: string) => (value: number) => Plural;
250250

251-
// @public
251+
// @public @deprecated
252252
export function getLocaleTimeFormat(locale: string, width: FormatWidth): string;
253253

254-
// @public
254+
// @public @deprecated
255255
export function getLocaleWeekEndRange(locale: string): [WeekDay, WeekDay];
256256

257-
// @public
257+
// @public @deprecated
258258
export function getNumberOfCurrencyDigits(code: string): number;
259259

260260
// @public
@@ -725,7 +725,7 @@ export class NgTemplateOutlet<C = unknown> implements OnChanges {
725725
static ɵfac: i0.ɵɵFactoryDeclaration<NgTemplateOutlet<any>, never>;
726726
}
727727

728-
// @public
728+
// @public @deprecated
729729
export enum NumberFormatStyle {
730730
// (undocumented)
731731
Currency = 2,
@@ -737,7 +737,7 @@ export enum NumberFormatStyle {
737737
Scientific = 3
738738
}
739739

740-
// @public
740+
// @public @deprecated
741741
export const NumberSymbol: {
742742
readonly Decimal: 0;
743743
readonly Group: 1;
@@ -842,7 +842,7 @@ export abstract class PlatformLocation {
842842
static ɵprov: i0.ɵɵInjectableDeclaration<PlatformLocation>;
843843
}
844844

845-
// @public
845+
// @public @deprecated
846846
export enum Plural {
847847
// (undocumented)
848848
Few = 3,
@@ -910,7 +910,7 @@ export class SlicePipe implements PipeTransform {
910910
static ɵpipe: i0.ɵɵPipeDeclaration<SlicePipe, "slice", true>;
911911
}
912912

913-
// @public
913+
// @public @deprecated
914914
export type Time = {
915915
hours: number;
916916
minutes: number;
@@ -930,7 +930,7 @@ export class TitleCasePipe implements PipeTransform {
930930
static ɵpipe: i0.ɵɵPipeDeclaration<TitleCasePipe, "titlecase", true>;
931931
}
932932

933-
// @public
933+
// @public @deprecated
934934
export enum TranslationWidth {
935935
Abbreviated = 1,
936936
Narrow = 0,
@@ -966,7 +966,7 @@ export abstract class ViewportScroller {
966966
static ɵprov: unknown;
967967
}
968968

969-
// @public
969+
// @public @deprecated
970970
export enum WeekDay {
971971
// (undocumented)
972972
Friday = 5,

0 commit comments

Comments
 (0)