馃悶 bug report
Affected Package
The issue is caused by package @angular/common.
Description
I18n methods like getLocaleDayNames or getLocaleMonthNames (maybe there are more - haven't checked) always returns the same reference.
Let the code speak for itself:
const dayNames = getLocaleDayNames('en-US', FormStyle.Format, TranslationWidth.Short);
// dayNames = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"]
dayNames.splice(2);
// dayNames = ["Su", "Mo"];
const freshDayNames = getLocaleDayNames('en-US', FormStyle.Format, TranslationWidth.Short);
// freshDayNames = ["Su", "Mo"];
// 馃檧 馃檧 馃檧
This can lead to undesirable behaviour when some third party library modifies locale data.
馃敩 Minimal Reproduction
https://stackblitz.com/edit/angular-vbiv7d
馃悶 bug report
Affected Package
The issue is caused by package
@angular/common.Description
I18n methods like
getLocaleDayNamesorgetLocaleMonthNames(maybe there are more - haven't checked) always returns the same reference.Let the code speak for itself:
This can lead to undesirable behaviour when some third party library modifies locale data.
馃敩 Minimal Reproduction
https://stackblitz.com/edit/angular-vbiv7d