function getMonthName(monthNumber) {
const date = new Date();
date.setMonth(monthNumber - 1);
return date.toLocaleString([], { month: 'long' });
}
Post funny things about programming here! (Or just rant about your favourite programming language.)
Somebody has not worked with dates for very long, to be so sure of themselves…
I’ve worked with dates long enough in lots of different languages to recognize API decisions that are absurd.