2019-10-11 18:41:29 +02:00
|
|
|
function localeMonthNames(): string[] {
|
|
|
|
const monthNames: string[] = [];
|
|
|
|
for (let i = 0; i < 12; i += 1) {
|
|
|
|
const d = new Date(2019, i, 1);
|
2020-02-18 08:57:00 +01:00
|
|
|
const month = d.toLocaleString("default", { month: "long" });
|
2019-10-11 18:41:29 +02:00
|
|
|
monthNames.push(month);
|
|
|
|
}
|
|
|
|
return monthNames;
|
|
|
|
}
|
|
|
|
|
|
|
|
function localeShortWeekDayNames(): string[] {
|
|
|
|
const weekDayNames: string[] = [];
|
|
|
|
for (let i = 13; i < 20; i += 1) {
|
|
|
|
const d = new Date(2019, 9, i);
|
2020-02-18 08:57:00 +01:00
|
|
|
const weekDay = d.toLocaleString("default", { weekday: "short" });
|
2019-10-11 18:41:29 +02:00
|
|
|
weekDayNames.push(weekDay);
|
|
|
|
}
|
|
|
|
return weekDayNames;
|
|
|
|
}
|
|
|
|
|
|
|
|
export { localeMonthNames, localeShortWeekDayNames };
|