Month names from month number discussion

With much ado, I decided on this snippet to extract the name of the month from the number of the month.

<h4>{{ "1000-" ~ month ~ "-10" | date(format="%B") }}</h4>

I give it a fake year and day, and only extract a month, as I am iterating on an array of posts grouped by month. This is fine, but there has to be a better way to do this. Thoughts?

You can put the names in the extra part of a config as an object/array and index on that with month. It’s not going to be built-in because chrono only supports English and I don’t really want to bundle a full i18n suite

1 Like