User Guide Cancel

MonthAsString

 

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])
MonthAsString(month [, locale])
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>
<cfscript> myLocale=getLocale() myMonth=5; monthAsString=monthAsString(myMonth,myLocale) writeOutput(monthAsString) </cfscript>
<cfscript>
    myLocale=getLocale()
    myMonth=5;
    monthAsString=monthAsString(myMonth,myLocale)
    writeOutput(monthAsString)
</cfscript>

Output

May

Get help faster and easier

New user?

Adobe MAX 25

Adobe MAX

The Creativity Conference

Oct 28–30 Los Angeles and online

Adobe MAX

The Creativity Conference

Oct 28–30 Los Angeles and online

Adobe MAX 25

Adobe MAX

The Creativity Conference

Oct 28–30 Los Angeles and online

Adobe MAX

The Creativity Conference

Oct 28–30 Los Angeles and online