Status/Resolution/Reason: Closed/Fixed/Fixed
Reporter/Name(from Bugbase): Aaron Neff / ()
Created: 04/06/2018
Components: Documentation
Versions: 2016
Failure Type: Conflict With Docs
Found In Build/Fixed In Build: 0 / NA
Priority/Frequency: Normal / Few users will encounter
Locale/System: / Platforms All
Vote Count: 0
Issue: some TimeFormat() masks are undocumented
Repro:
<cfscript>
myDateTime = createDateTime(2016,1,3,12,34,56);
commonMasks = ["d", "dd", "m", "mm", "mmm", "mmmm", "w", "W", "yy", "yyyy", "YYYY", "short", "medium", "long", "full"];//Documented in DateFormat() and DateTimeFormat() docs
dateFormatMasks = ["ddd", "dddd", "e", "E", "f", "F", "k", "K", "gg", "z", "Z", "X"];//Only documented in DateFormat() doc
dateTimeFormatMasks = ["EEE", "EEEE", "Y", "YY", "G", "ww", "WW"];//Only documented in DateTimeFormat() doc
simpleDateFormatMasks = ["M", "L", "D", "u", "a"];//Only documented in SimpleDateFormat doc
result = queryNew("pattern,isInDateFormatDoc,isInDateTimeFormatDoc,dateFormatOutput,dateTimeFormatOutput", "varchar,bit,bit,varchar,varchar");
commonMasks.each(function(element) {
result.addRow([element, true, true, myDateTime.dateFormat(element), myDateTime.dateTimeFormat(element)]);
});
dateFormatMasks.each(function(element) {
result.addRow([element, true, false, myDateTime.dateFormat(element), myDateTime.dateTimeFormat(element)]);
});
dateTimeFormatMasks.each(function(element) {
result.addRow([element, false, true, myDateTime.dateFormat(element), myDateTime.dateTimeFormat(element)]);
});
simpleDateFormatMasks.each(function(element) {
result.addRow([element, false, false, myDateTime.dateFormat(element), myDateTime.dateTimeFormat(element)]);
});
writeOutput(myDateTime);
writeDump(result);
</cfscript>
Actual result: masks "k and K" are undocumented in the TimeFormat() doc
Expected result: masks "k and K" are documented in the TimeFormat() doc
Notes:
1) Since k is "Hour in day (1-24)" and K is "Hour in am/pm (0-11)", they should be separate bullets on the TimeFormat() doc. Not grouped together as "k/K".
Related URL: https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-functions/functions-t-z/timeformat.html
Attachments:
Comments: