Status/Resolution/Reason: Closed/Fixed/Fixed
Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)
Created: 03/09/2012
Components: Language
Versions: 2016,11.0
Failure Type: Data Corruption
Found In Build/Fixed In Build: 9.0 / 2018.0.0.309259
Priority/Frequency: Normal / Some users will encounter
Locale/System: English / Win XP All
Vote Count: 9
See this thread on the Adobe forums:
http://forums.adobe.com/message/4219877#4219877
Summary:
All of this can be somewhat simplified to this:
<cfif "0,6" eq "6,0">
EQUALS
<cfelse>
NOT EQUALS
</cfif>
And the answer is - according to CF - "EQUALS".
My reaction to that is:
WTF?
[...]
Someone from Adobe has explained this to me. Believe it or not, both "0,5" and "5,0" - to CF - mean 0th May 2012... which equates to 30 April 2012 ("of course" we all cry, whilst slapping our foreheads ;-).
Example:
<cfset d1 = "0,5">
<cfset d2 = "5,0">
<cfoutput>
#dateFormat(d1)#<br />
#dateFormat(d2)#<br />
</cfoutput>
Bottom line: strings of format "n,m" where n and m are numeric and fall within the range of month numbers or date-of-month numbers (including 0 in this case) are cast to dates, which is inappropriate. In no situation is "d,m" or "m,d" considered a date, and CF should not treat it as such.
--
Adam
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3134331
External Customer Info:
External Company:
External Customer Name: Adam Cameron.
External Customer Email:
External Test Config: My Hardware and Environment details:
Attachments:
Comments: