title: Rails: Date.today - 1.day
body: <p>Using the rails console, I just got bit by this:</p>
  
  <p>Assume today is December 11.</p>
  
  <pre><code>Date.today-1.day   # December 10  (no spaces)
  Date.today - 1.day # December 10  (a space on both sides of the minus sign)
  Date.today -1.day  # December 11  whaaaat?
  Date.today -5.days # Still december 11!
  </code></pre>
  
  <p>Can someone explain what's going on here?  I am a little worried about how easy this could be missed in code.  Any other suggestions on how to code this?</p>