开发者

Is there an equivalent in RoR for PHP's gmdate?

For instance, if I called:

gmdate("M-D-yTh:i:s")

Is there something similar for this case in RoR? I guess I could always DateTime.now.hour, DateTime.now.year, etc. etc. but that seems extremely wron开发者_开发技巧g.


See strftime() in Ruby's documentation on Time, which formats a time according to the directives in the given format string.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜