Breaking change in CF2021, new date format mask of D may be serious problem for old code
Note: This blog post is from 2020. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.(I've revised this post since its original writing, the week after CF2021 came out. I've tried to help it make better sense for those reading it in the years to follow, as it will affect us in future releases as well.)
It turns out that with the release of CF2021, Adobe introduced a breaking change...if you use any of the CF tags or functions that use date formatting masks. The problem is that while a capital "D" value used in such mask used to simply mean the same as a lower-case "d" ("day of month"), the change in CF2021 is that "D" now means instead "day of YEAR"! That can be a devastating problem that might lurk for days or weeks, corrupting your data.
TLDR; You have two solutions:
- you can choose either find and change the affected code (not easy but using techniques shared below)
- or you can implement a new JVM arg that Adobe offers to revert this behavior back to how things worked before CF2021 (discussed below), which still applies in CF2023 and beyond
If you're affected, you must do one or the other of these things. For more, read on.




