Status/Resolution/Reason: Closed/Withdrawn/AsDesigned
Reporter/Name(from Bugbase): Aaron Neff / ()
Created: 04/07/2018
Components: Language, Member Functions
Versions: 2016
Failure Type: Others
Found In Build/Fixed In Build: /
Priority/Frequency: Normal /
Locale/System: /
Vote Count: 0
Note: The language should be predictable. If someDataTypeBIF(myVariable) works, then myVariable.someDataTypeBIF() should also work.
This ER is for simpleValue.date|time|dateTimeFormat(), for simple values that can be treated as DateTime.
Repro:
<cfscript>
simpleValues = [2000,2*1000,2000.0,"2000",createDate(2018,1,1)+1];
simpleValues.each(function(element) {
try {
writeOutput(dateFormat(element) & ' | ' & timeFormat(element) & ' | ' & dateTimeFormat(element) & ' | ' & element.dateFormat() & ' | ' & element.timeFormat() & ' | ' & element.dateTimeFormat() & '<br>');
}
catch(any e) {
writeOutput(dateFormat(element) & ' | ' & timeFormat(element) & ' | ' & dateTimeFormat(element) & ' | .date|time|dateTimeFormat() doesn''t exist<br>');
}
});
</cfscript>
Actual result:
22-Jun-05 | 12:00 AM | 22-Jun-1905 00:00:00 | .date|time|dateTimeFormat() doesn't exist
22-Jun-05 | 12:00 AM | 22-Jun-1905 00:00:00 | .date|time|dateTimeFormat() doesn't exist
22-Jun-05 | 12:00 AM | 22-Jun-1905 00:00:00 | .date|time|dateTimeFormat() doesn't exist
22-Jun-05 | 12:00 AM | 22-Jun-1905 00:00:00 | .date|time|dateTimeFormat() doesn't exist
02-Jan-18 | 12:00 AM | 02-Jan-2018 00:00:00 | .date|time|dateTimeFormat() doesn't exist
Expected result:
22-Jun-05 | 12:00 AM | 22-Jun-1905 00:00:00 | 22-Jun-05 | 12:00 AM | 22-Jun-1905 00:00:00
22-Jun-05 | 12:00 AM | 22-Jun-1905 00:00:00 | 22-Jun-05 | 12:00 AM | 22-Jun-1905 00:00:00
22-Jun-05 | 12:00 AM | 22-Jun-1905 00:00:00 | 22-Jun-05 | 12:00 AM | 22-Jun-1905 00:00:00
22-Jun-05 | 12:00 AM | 22-Jun-1905 00:00:00 | 22-Jun-05 | 12:00 AM | 22-Jun-1905 00:00:00
02-Jan-18 | 12:00 AM | 02-Jan-2018 00:00:00 | 02-Jan-18 | 12:00 AM | 02-Jan-2018 00:00:00
Attachments:
Comments: