How can I use US-style dates in Rails using Ruby 1.9?

后端 未结 7 1837
攒了一身酷
攒了一身酷 2021-01-04 09:21

I\'m in the U.S., and we usually format dates as "month/day/year". I\'m trying to make sure that my Rails app, using Ruby 1.9, assumes this format everywhere, and

相关标签:
7条回答
  • 2021-01-04 10:22

    Use REE? :D

    Seriously though. If this is a small app you have complete control over or you are standardizing on that date format, monkey patching for a project is totally reasonable. You just need to make sure all your inputs come in with the correct format, be it via API or website.

    0 讨论(0)
提交回复
热议问题