rails dates with json

前端 未结 7 1626
你的背包
你的背包 2020-11-30 02:16

I am implementing a Facebook application and using AJAX/JSON.

However the JSON structures that are returned have this format 2010-05

7条回答
  •  半阙折子戏
    2020-11-30 02:22

    Definitely easier to do it on the server side. You can do a gsub regex to put it into the format you want, or a time.strftime, then generating your json with that string.

提交回复
热议问题