I am working on a tax project. Taxes are broken down into quarters. the months the taxes are run are March, June, Sept, and December. once run my website displays when the taxes will run again. my problem is that in my results page when the next run date is December instead of displaying 12-2012 i get something that looks like 0-2012.
Here is my code:
<td style="white-space: nowrap;"> #stec_mysql_search_results.cover_date# </td>
<td style="white-space: nowrap;"> <cfif "" neq stec_mysql_search_results.next_run>0<cfset temp_next_run = stec_mysql_search_results.next_run MOD 4><cfswitch expression="#temp_next_run#">
<cfcase value="1">3</cfcase>
<cfcase value="2">6</cfcase>
<cfcase value="3">9</cfcase>
<cfcase value="4">12</cfcase>
</cfswitch>-<cfif 4 lt stec_mysql_search_results.next_run>#year(now())+1#<cfelse>#year(now())#</cfif></cfif> </td>
Here is the output when you view source:
<td style="white-space: nowrap;"> 07-16-2012 </td>
<td style="white-space: nowrap;"> 0-2012 </td>
cfcase will accept a list, maybe you're over complicating it, why not do this: