Title:
dateTimeFormat("YYYY") increments year for dates between December 27 and December 31
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Alexander Kwaschny / Alexander Kwaschny (Alexander Kwaschny)
Created: 01/11/2016
Components: Documentation, General
Versions: 10.0
Failure Type:
Found In Build/Fixed In Build: Final /
Priority/Frequency: Normal / Some users will encounter
Locale/System: English / Win 2008 Server R2 64 bit
Vote Count: 2
Problem Description:
The dateTimeFormat function returns an incremented year value when using the uppercase year mask when the date to format lies between December 27 and December 31.
Steps to Reproduce:
<cfset december26_lastYear = createDate(2015, 12, 26)>
<cfset december27_lastYear = createDate(2015, 12, 27)>
<cfoutput>
#dateTimeFormat(december26_lastYear, "YYYY")#<br>
<!--- >> 2015 --->
#dateTimeFormat(december26_lastYear, "yyyy")#<br>
<!--- >> 2015 --->
#dateTimeFormat(december27_lastYear, "YYYY")#<br>
<!--- >> 2016 --->
#dateTimeFormat(december27_lastYear, "yyyy")#<br>
<!--- >> 2015 --->
</cfoutput>
Actual Result:
See comments in example.
Expected Result:
As long as the uppercase YYYY mask is not documated differently, I expect it to work the same way as the lowercase yyyy mask.
Any Workarounds:
Not using uppercase letters for the year mask.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4105828
External Customer Info:
External Company:
External Customer Name: Alexander Kwaschny
External Customer Email:
External Test Config: Adobe ColdFusion Server Enterprise 10.0.18.283922 on Windows Server 2008 R2 Enterprise
TimeZone is CET.
Attachments:
Comments: