tracker issue : CF-3208600

select a category, or use search below
(searches all categories and all time range)
Title:

dateTimeFormat doesn't support the "m" format

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Raymond Camden / Raymond Camden (Raymond Camden)

Created: 06/07/2012

Components: Documentation

Versions: 10.0

Failure Type: Data Corruption

Found In Build/Fixed In Build: Final /

Priority/Frequency: Major / Most users will encounter

Locale/System: English / Windows 7 64-bit

Vote Count: 0

According to the docs, and the JavaDocs, and even pure Java code run in CF, if you 'm' it should be minutes. But it always renders as the month instead.

<cfoutput>
#dateTimeFormat(now())#<br/>
#dateTimeFormat(now(), "MMMM d, yyyy h:mm a")#<br/>
</cfoutput>

Compare it to this Java which renders ok:

<cfscript>	
sdf=createObject("java","java.text.SimpleDateFormat").init("dd-MMM-yyyy hh:mm");
writeoutput("#sdf.format(now())#"); 
</cfscript>

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3208600

Deployment Phase:	Release Candidate

External Customer Info:
External Company:  
External Customer Name: cfjedimaster
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments:

This is actually a doc bug. DateTimeFormat support only the ColdFusion format and not the java format. The change was made after the public beta and the doc does not seem to have got updated.
Comment by Rupesh K.
19068 | June 08, 2012 01:53:46 AM GMT
Corrected this in Wiki. But still please validate. Assigning to Frank. (Comment added from ex-user id:ramachan)
Comment by Adobe D.
19069 | May 21, 2013 11:52:16 PM GMT
Required information updated in Wiki. (Comment added from ex-user id:duttswam)
Comment by Adobe D.
19070 | December 18, 2014 03:16:49 AM GMT