A locally sensitive result can be obtained in this way; put the number in the month-position of the date that has passed as the date that will be displayed to date, and choose an arbitrary year and day (stay away from the 50s and the distant future and avoid days that are much more than 20). This should not be the actual year:
i=10; date -d 2012/${i}/01 +%b
Here, with locale de_DE, I get the result:
Okt
(I did not select April because it is the default value for the date for the current month, so with a poorly formatted -d -date you get April, even if I = 10. I know this because I experienced it. Also: German the name of April is April, so it will not serve as an example for more subtle details that are being followed just now :)
i=10; LC_ALL=C date -d 2012/${i}/01 +%b
it shows a month in international standard style.
The advantage of the solution is that it will survive the revolutions that rename the months Brummers, Obama or internationalization (Mรคr, Mai, Okt, Dez in German, i.e.).
source share