Description

Determines the name of the month that corresponds to month_number.

Returns

A string; the name of the specified month, in the current locale.

History

ColdFusion (2018 release): Changed Parameter name month_number to month.

Category

Date and time functionsString functions

Function syntax

MonthAsString(month [, locale])

See also

DatePartMonthQuarter

History

  • ColdFusion (2018 release): Changed parameter name month_number to month.
  • ColdFusion 8: Added the locale parameter.

Parameters

Parameter

Description

month

An integer in the range 1 - 12.

locale

Locale to use instead of the locale of the page when processing the function

Example

<cfscript>
    myLocale=getLocale()
    myMonth=5;
    monthAsString=monthAsString(myMonth,myLocale)
    writeOutput(monthAsString)
</cfscript>

Output

May

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy