tracker issue : CF-4099971

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

[ANeff] Doc Bug for: dateTimeFormat() w ww W WW masks undocumented

| View in Tracker

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

Listed in the version 2016.0.0.297996 Issues Fixed doc
Verification notes: verified_fixed on May 18, 2018 using build 2016.0.01.298513
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:

The link should be kept up to date for the current version of Java, but other than that I think they're doing the right thing. There is no need to replicate the docs for SimpleDateFormat if that's all they're proxying for. So this is a "no" vote for this ticket. Other than updating that link to point to http://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html
Comment by External U.
5099 | December 21, 2015 06:55:48 AM GMT
Hi Adam, I don't think they're simply proxying for the SimpleDateFormat doc b/c masks "u" and "X" aren't supported which may be implied if they'd update the link to point to that URL. Thanks!, -Aaron
Comment by External U.
5100 | December 21, 2015 02:02:18 PM GMT
Hi Adobe, This doc bug ticket is marked Closed/Fixed. It is not fixed. The doc was never updated. To verify, please see the URL in this ticket's description (which is: https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-functions/functions-c-d/DateTimeFormat.html). Thanks!, -Aaron
Comment by External U.
5101 | January 05, 2016 03:31:54 AM GMT
Hi Adobe, I've verified this is fixed. Thanks!, -Aaron
Comment by Aaron N.
27855 | May 18, 2018 06:50:46 AM GMT