Skip to main content

sortMonthNames

Sorts month names in order of calendar month. The return value is a sorted list.

You can pick which language the function uses by specifying a locale in the second parameter.

The default language is English.

Parameters

  • MONTHS LIST (list, column, or row)

    A list, column, or row of month names to sort. You can give month names in full (e.g. 'January') or in abbreviated form (e.g. 'Jan').

  • LOCALE (string)

    Optional. Determines which language the function uses to read the month names. All supported locales are included in the parameter dropdown in the Function Builder.

    Default: en_US

Examples

ATL in Script

Result

[[

myList = ('June', 'March', 'July', 'April')

sortMonthNames(myList)

]]

March, April, June and July

[[

myList = ('juin', 'mars', 'juillet','avril')

sortMonthNames(myList, 'fr_FR')

]]

mars, avril, juin and juillet

[[

myList = ('junio', 'marzo', 'julio','abril')

sortMonthNames(myList, 'es_ES')

]]

marzo, abril, junio and julio

The second and third examples specify a locale in the second parameter.