Adding compatibility for Ruby on Rails dates