title: What is causing this invalid date error?
body: <p>On this line of code:</p>
  
  <pre><code>@note.date = Date.strptime(params[:custom_date], '%d-%m-%Y') unless params[:custom_date].blank?
  </code></pre>
  
  <p>I get this error:</p>
  
  <pre><code>ArgumentError: invalid date
  /usr/ruby1.9.2/lib/ruby/1.9.1/date.rb:1022
  </code></pre>
  
  <p>Here are the parameters:</p>
  
  <pre><code>{
    "commit"             =&gt; "Create",
    "utf8"               =&gt; "\342\234\223",
    "authenticity_token" =&gt; "RKYZNmRaElg/hT5tlmLcqnstnOapdhiaWmDcjNDtSOI=",
    "action"             =&gt; "create",
    "note"               =&gt; { "name"=&gt;"note1", "detail"=&gt;"detail" },
    "controller"         =&gt; "notes",
    "custom_date"        =&gt; "03-03-2010"
  }
  </code></pre>
  
  <p>What is causing this error? Thanks for reading.</p>