Default Date Format in Rails (Need it to be ddmmyyyy)

后端 未结 6 1564
野的像风
野的像风 2020-12-03 08:28

I\'ve been working with a rails form all day and I was just randomly testing it and tried the date 25/12/2009 and it came up with a huge error.

It was at this point

6条回答
  •  鱼传尺愫
    2020-12-03 09:01

    Updated I18n...

    date:
      formats:
        default: "%m/%d/%Y"
        short: "%b %d"
        long: "%B %d, %Y"
    

提交回复
热议问题