Kinky Calendar Leap Year Update

Just a quick update - Peter Bell pointed out to me that my ColdFusion Kinky Calendar system was breaking on my site. I took a quick look, and indeed it was. Oh No! So, I threw on my ColdFusion ninja suit and jumped into action. The problem was a little mysterious to debug, but I finally narrowed it down to a leap year problem. The leap year itself was not causing the problem; the problem was that I had some code that looked like this:

CreateDate(

(Year( start_date ) - 1),

Month( start_date ),

Day( start_date )

)

The problem here is that on February 29th of this year, the above code tried to create the 29th of last year. Of course, there was no February 29th of last year. This was an easy fix with some conditional logic.

It was the _functions.cfm file. It was several different lines for the month repeat and the year repeat. It's probably just easiest to download the ZIP and replace that function. Or, if you just want to swap out those case statements:

<!--- Repeat monthly. ---><cfcase value="4">

and

<!--- Repeat yearly. ---><cfcase value="5">

@Steve,

Hmmm, not sure. I think you might be on to something :) I love when I overlook the most obvious solution! Thanks Steve.