This works fine export LANG=en_GB.utf8 for i in {01..12} do mnd=$(date -d "2020-$i-01" +%B) date -d "01-${mnd:0:3}-2020" +%B done
But this doesn't work for months may, october, and desember export LANG=nn_NO.utf8 for i in {01..12} do mnd=$(date -d "2020-$i-01" +%B) date -d "01-${mnd:0:3}-2020" +%B done It is also worth noting the difference when your not taking a substring of the month, works fine with english and more fails with norwegian.