Determines the name of the month that corresponds to month_number.
A string; the name of the specified month, in the current locale.
History
ColdFusion (2018 release): Changed Parameter name month_number to month.
Date and time functions, String functions
MonthAsString(month [, locale])
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 |
<cfscript>
myLocale=getLocale()
myMonth=5;
monthAsString=monthAsString(myMonth,myLocale)
writeOutput(monthAsString)
</cfscript>
Output
May
Sign in to your account