Skip to content

Instantly share code, notes, and snippets.

@iconecd
Forked from anonymous/trycf-gist.cfm
Last active August 29, 2015 14:18
Show Gist options
  • Save iconecd/ef842bd7398b5bfc4297 to your computer and use it in GitHub Desktop.
Save iconecd/ef842bd7398b5bfc4297 to your computer and use it in GitHub Desktop.
<cfscript>
function monthAbbrAsInt(required string input) {
var dte = input & " 1, 2000";
if ( isDate( dte ) ) {
return dateFormat(dte, "m");
}
return 0;
}
writedump(monthAbbrAsInt("jul"));
writedump(monthAbbrAsInt("wat"));
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment