Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)
Created: 12/14/2015
Components: Documentation, General
Versions: 11.0
Failure Type: Unspecified
Found In Build/Fixed In Build: CF11_Final /
Priority/Frequency: Trivial / Some users will encounter
Locale/System: English / Platforms All
Vote Count: 1
dateTimeFormat()'s w ww W WW masks are undocumented
Repro:
<cfscript>
dateTime = createDate(2016,2,1);
writeOutput(dateTimeFormat(dateTime, "w"));
writeOutput(' ' & dateTimeFormat(dateTime, "ww"));
writeOutput(' ' & dateTimeFormat(dateTime, "W"));
writeOutput(' ' & dateTimeFormat(dateTime, "WW"));
</cfscript>
Actual and Expected output: 6 06 1 01
But they are undocumented: https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-functions/functions-c-d/DateTimeFormat.html
They should be documented as:
w: Week in year, no leading zero for single-digit weeks
ww: Week in year, a leading zero for single-digit weeks
W: Week in month, no leading zero for single-digit weeks
WW: Week in month, a leading zero for single-digit weeks
The doc does link to http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html which does list those masks. But the masks should also be listed in the DateTimeFormat doc.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4099971
External Customer Info:
External Company:
External Customer Name: Aaron Neff
External Customer Email:
Attachments:
Comments: