numberAsMonth
Returns the month name for the input number — e.g. March for 3.
You can pick which language the function uses by specifying a locale in the second parameter.
The default language in US English.
To perform the reverse operation, use the monthAsNumber function.
Parameters
MONTH NUMBER (number)
The input number. This must be an integer between 1 and 12 (inclusive).
LOCALE (string)
Optional. Determines which language the function uses for the output text. All supported locales are included in the parameter dropdown in the Funciton Builder.
Default: en_US
Examples
ATL in Script | Result | Notes |
---|---|---|
| January | The locale code is en_US (default), so the function returns the name of the first month of the year in English. |
| Février | The locale code is fr_FR, so the function returns the name of the second month of the year in French. |
| Marzo | The locale code is es_ES, so the function returns the name of the third month of the year in Spanish. |
| Апреля | The locale is ru_RU, so the function returns the name of the fourth month of the year in Russian. |
| 五月 | The locale is zh_CH, so the function returns the name of the fifth month of the year in Chinese. |
Studio automatically capitalizes the first letter of a new sentence — this is why the Result column shows some month names with initial capitalization, even though that isn't the convention in the selected language.
If you use numberAsMonth
mid-sentence, you see the correct capitalization applied.
ATL in Script | Result |
---|---|
| The French word for February is février |
Tip
You can turn off automatic capitalization in your project settings. See Settings > Postprocessing.