Public
Edited
Feb 13
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
{
moment.locale(myLocale);

return Array.from({ length: 7 }, (_, i) => moment().day(i+1).format('dddd'))
}
Insert cell
Insert cell
{
const formatter = Intl.DateTimeFormat(myLocale, { weekday: 'long' });
return Array.from({ length: 7 }, (_, i) => formatter.format(new Date(Date.UTC(2024, 3, i+1))))
}
Insert cell
Insert cell
{
const weekDays = luxon.Info.weekdays('long', { locale: myLocale });
return Array.from({ length: 7 }, (_, i) => weekDays[i]);
}
Insert cell
Insert cell
Insert cell
{
moment.locale(myLocale);
return Array.from({ length: 7 }, (_, i) => moment().weekday(i).format('dddd'))
}
Insert cell
Insert cell
{
const formatter = Intl.DateTimeFormat(myLocale, { weekday: 'long' });
const firstDayOffset = new Intl.Locale(myLocale).getWeekInfo().firstDay;
return Array.from({ length: 7 }, (_, i) => formatter.format(new Date(Date.UTC(2024, 3, (i + firstDayOffset) % 7))))
}
Insert cell
Insert cell
{
const weekDays = luxon.Info.weekdays('long', { locale: myLocale });
const firstDayOffset = luxon.Info.getStartOfWeek({ locale: myLocale });
return Array.from({ length: 7 }, (_, i) => weekDays[(i + firstDayOffset - 1) % 7]);
}
Insert cell
Insert cell
Insert cell
{
moment.locale(myLocale);
return Array.from({ length: 12 }, (_, i) => moment().month(i).format('MMMM'))
}
Insert cell
Insert cell
{
const formatter = Intl.DateTimeFormat(myLocale, { month: 'long' });

return Array.from({ length: 12 }, (_, i) => formatter.format(new Date(Date.UTC(2021, i))))
}
Insert cell
Insert cell
{
return luxon.Info.months('long', {locale: myLocale})
}
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more