View comments | RSS feed
Contents > CFML Reference > ColdFusion Functions > MonthAsString PreviousNext

MonthAsString

Determines the name of the month that corresponds to month_number.

A string; the name of a month.

Date and time functions, String functions

MonthAsString(month_number)

DatePart, Month, Quarter

Parameter

Description

month_number

An integer in the range 1 - 12.

<h3>MonthAsString Example</h3>

<cfif IsDefined("FORM.year")>
<p>More information about your date:
<cfset yourDate = CreateDate(FORM.year, FORM.month, FORM.day)>

<cfoutput>
<p>Your date, #DateFormat(yourDate)#.
<br>It is #DayofWeekAsString(DayOfWeek(yourDate))#, day
 #DayOfWeek(yourDate)# in the week.
<br>This is day #Day(YourDate)# in the month of
 #MonthAsString(Month(yourDate))#, which has 
  #DaysInMonth(yourDate)# days.
<br>We are in week #Week(yourDate)# of #Year(yourDate)# 
   (day #DayofYear(yourDate)# of #DaysinYear(yourDate)#). <br>
   <cfif IsLeapYear(Year(yourDate))>This is a leap year
      <cfelse>This is not a leap year
   </cfif>
</cfoutput>
</cfif>

Contents > CFML Reference > ColdFusion Functions > MonthAsString PreviousNext

ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting

Version 6.1

Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.

Comments


fstrevisan said on Sep 21, 2006 at 2:26 AM :
It appears that this function uses the system (JAVA? Server?) locale, instead of the locale defined via setlocale().
Can anyone confirm this?
halL said on Sep 21, 2006 at 8:14 AM :
In ColdFusion 6.1 this function always used the JVM default locale to format the string.
This behavior was changed in 7.0 to use the locale set with SetLocale().

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/functa46.htm