`
hitwzh
  • 浏览: 9576 次
  • 性别: Icon_minigender_1
  • 来自: 上海
最近访客 更多访客>>
社区版块
存档分类
最新评论

rails 中 date 输出 格式

阅读更多
If you want to change or add formats, put something like this in your
environment.rb after the end of the Initializer block:

ActiveSupport::CoreExtensions::Time::Conversions::DATE_FORMATS.merge!(
   :default => '%m/%d/%Y',
   :date_time12  => "%m/%d/%Y %I:%M%p",
   :date_time24  => "%m/%d/%Y %H:%M",
 )


reboot server

http://www.ruby-forum.com/topic/57923
0
1
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics