Status/Resolution/Reason: Closed/Withdrawn/AsDesigned
Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)
Created: 12/16/2015
Components: Language, Functions
Versions: 11.0
Failure Type:
Found In Build/Fixed In Build: CF11_Final /
Priority/Frequency: Major / Some users will encounter
Locale/System: ALL / Platforms All
Vote Count: 3
Repro:
<cfscript>
aDateObject = createDate(2015,12,16);
notANumericDate = dateFormat(aDateObject, "d mmmm, yyyy");
aNumericDate = aDateObject+0;
writeDump(label="baseline", var=[
aDateObject,
aDateObject.getClass().getName(),
notANumericDate,
notANumericDate.getClass().getName(),
aNumericDate,
aNumericDate.getClass().getName()
]);
writeDump(label="test with notANumericDate", var={
"isDate" = isDate(notANumericDate),
"isValid" = isValid("date", notANumericDate),
"isNumericDate" = isNumericDate(notANumericDate)
});
writeDump(label="test with aNumericDate", var={
"isDate" = isDate(aNumericDate),
"isValid" = isValid("date", aNumericDate),
"isNumericDate" = isNumericDate(aNumericDate)
});
writeDump(label="test with aDateObject", var={
"isDate" = isDate(aDateObject),
"isValid" = isValid("date", aDateObject),
"isNumericDate" = isNumericDate(aDateObject)
});
writeDump(label="parse them", var={
"aDateObject" = parseDateTime(aDateObject),
"notANumericDate" = parseDateTime(notANumericDate),
"aNumericDate" = parseDateTime(aNumericDate)
});
</cfscript>
Expectations:
1) notANumericDate - which is clearly NOT A NUMERIC DATE - should not validate as a numeric date;
2) if aDateObject parses OK, then aNumericDate should *probably* parse back to the same date, but that's arguably a misuse of this function
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4100808
External Customer Info:
External Company:
External Customer Name: Adam Cameron
External Customer Email:
External Test Config: My Hardware and Environment details:
Attachments:
Comments: