Skip to content

Instantly share code, notes, and snippets.

@ciaranarcher
Created July 29, 2011 13:36
Show Gist options
  • Save ciaranarcher/1113808 to your computer and use it in GitHub Desktop.
Save ciaranarcher/1113808 to your computer and use it in GitHub Desktop.
ColdFusion - loop through the months in a year
<cfoutput>
<select name="birthMonth">
<cfloop index="i" from="2010-01-01" to="2011-01-01" step="#createTimeSpan(31, 0, 0, 0)#">
<option value="">#dateFormat(i, "MMM")#</option>
</cfloop>
</select>
</cfoutput>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment