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.
精彩评论