Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trycf/a669e32a64bb87b7cca73d228b6a3949 to your computer and use it in GitHub Desktop.
Save trycf/a669e32a64bb87b7cca73d228b6a3949 to your computer and use it in GitHub Desktop.
TryCF Gist
<cfoutput>
CF2021 adds new dateformat mask values of M, Y, and D (vs lowercase m, y,
and d). The first two seem to show no change, <b>but the new "D" is VERY
significant</b>, if you may have code that always used D or DD, when case
didn't matter and was ignored.
<p>
Notice how in CF2021, the 2nd and 3rd lines here produces a VERY
different result for the day (for D vs d), though no difference for
M vs m or Y vs y<br>
<b>dateformat("11-23-20","m-d-y"):</b>
#dateformat("11-23-20","m-d-y")#<br>
<b>dateformat("11-23-20","M-D-Y"):</b>
#dateformat("11-23-20","M-D-Y")#<br>
<b>dateformat("11-23-20","MM-DD-YY"):</b>
#dateformat("11-23-20","MM-DD-YY")#<br>
</cfoutput>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment